]> git.baikalelectronics.ru Git - kernel.git/commit
macvtap: Fix macvtap_open races in the zero copy enable code.
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 20 Oct 2011 04:26:39 +0000 (04:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Oct 2011 06:53:07 +0000 (02:53 -0400)
commit055a6692f1ef11979e416383e8e9c9b712fa7b96
treef4b18244c9daeea9a04b68a0fc050960e5c42507
parent6f43385a3fbc1af360ccbb13a037df49ce369377
macvtap: Fix macvtap_open races in the zero copy enable code.

To see if it is appropriate to enable the macvtap zero copy feature
don't test the lowerdev network device flags.   Instead test the
macvtap network device flags which are a direct copy of the lowerdev
flags.  This is important because nothing holds a reference to lowerdev
and on a very bad day we lowerdev could be a pointer to stale memory.

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