summaryrefslogtreecommitdiff
path: root/tools/hv
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2015-01-16 17:51:25 (GMT)
committerDavid S. Miller <davem@davemloft.net>2015-01-19 20:37:40 (GMT)
commit4f9dce230b32eec45cec8c28cae61efdfa2f7d57 (patch)
tree685c3ae92315b1627d99a9b72e6906031f3baba8 /tools/hv
parentb37feed7c2803cce71a746623594f19bbb5a21aa (diff)
downloadlinux-4f9dce230b32eec45cec8c28cae61efdfa2f7d57.tar.xz
sh_eth: Fix ethtool operation crash when net device is down
The driver connects and disconnects the PHY device whenever the net device is brought up and down. The ethtool get_settings, set_settings and nway_reset operations will dereference a null or dangling pointer if called while it is down. I think it would be preferable to keep the PHY connected, but there may be good reasons not to. As an immediate fix for this bug: - Set the phydev pointer to NULL after disconnecting the PHY - Change those three operations to return -ENODEV while the PHY is not connected Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/hv')
0 files changed, 0 insertions, 0 deletions