]> 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)
commit47963875c9cd788043cacf8a6d07f943ffbd9369
treef4b18244c9daeea9a04b68a0fc050960e5c42507
parent413ad822139196e9554035d530ddbcdb56b582d9
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