tun: Make tun_net_xmit atomic wrt tun_attach && tun_detach
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 20 Jan 2009 11:02:28 +0000 (11:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jan 2009 00:00:45 +0000 (16:00 -0800)
commit38231b7a8d1b74c920822640d1ce8eb8046377fb
treefc7f1c3cc8ef34a64a740a2938934dbd598f0d93
parent36b50bab53207daf34be63ca62fb8b0b08dc6e6b
tun: Make tun_net_xmit atomic wrt tun_attach && tun_detach

Currently this small race allows for a packet to be received when we
detach from an tun device and still be enqueued.  Not especially
important but not what the code is trying to do.

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