vlan/macvlan: fix NULL pointer dereferences in ethtool handlers
commit708f2c81c4de7b2660ca4703ba00e541f750b7e4
authorPatrick McHardy <kaber@trash.net>
Tue, 26 May 2009 22:49:11 +0000 (26 15:49 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Jun 2009 03:01:16 +0000 (11 20:01 -0700)
tree2d94016f6768492ddcdd4d501efeb1c194d6d924
parent54823830733c96b9eda9e82167dcc6f04b8a4ca0
vlan/macvlan: fix NULL pointer dereferences in ethtool handlers

[ Upstream commit 7816a0a862d851d0b05710e7d94bfe390f3180e2 ]

Check whether the underlying device provides a set of ethtool ops before
checking for individual handlers to avoid NULL pointer dereferences.

Reported-by: Art van Breemen <ard@telegraafnet.nl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/macvlan.c