]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: __ethtool_set_sg: check for function pointer before using it
authorRoger Luethi <rl@hellgate.ch>
Thu, 17 Mar 2011 06:37:21 +0000 (06:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Mar 2011 22:13:10 +0000 (15:13 -0700)
commit0fd0ecd874ea6e0a6242606c7d8d9795a68a9af3
treedd7e2eb386328b0c94ef939d27540c10f11df8e2
parent91e1ea18fdd3cf31f95a616e4828c77dfe61a986
ethtool: __ethtool_set_sg: check for function pointer before using it

__ethtool_set_sg does not check if dev->ethtool_ops->set_sg is defined
which can result in a NULL pointer dereference when ethtool is used to
change SG settings for drivers without SG support.

Signed-off-by: Roger Luethi <rl@hellgate.ch>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/ethtool.c