tun: Introduce tun_file
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 20 Jan 2009 11:00:40 +0000 (11:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jan 2009 00:00:44 +0000 (16:00 -0800)
commit631ab46b79559d6fed784fd7883c0cda4d8cfcfa
tree8f78e43c4b5adf223254da3315f4957ac629a38a
parenteac9e902658dab1e097b8ef064e9e3d16c152cc9
tun: Introduce tun_file

Currently the tun code suffers from only having a single word of
data that exists for the entire life of the tun file descriptor.

This results in peculiar holding of references to the network namespace
as well as races between free_netdevice and tun_chr_close.

Fix this by introducing tun_file which will hold the per file state.
For the moment it still holds just a single word so the differences
are all logic changes with no changes in semantics.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c