]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Check phydev->drv
authorFlorian Fainelli <f.fainelli@gmail.com>
Sat, 18 Feb 2017 00:07:34 +0000 (16:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2017 15:15:11 +0000 (10:15 -0500)
commitf10417b1d61eba810d06c9c862bbe80593d3f863
treeacc10c699ffcb5ceed825af9f051971f94387b09
parent219fac061d58eeaf13c7faf7da897b00c015000c
net: phy: Check phydev->drv

There are number of function calls, originating from user-space,
typically through the Ethernet driver that can make us crash by
dereferencing phydev->drv which will be NULL once we unbind the driver
from the PHY.

There are still functional issues that prevent an unbind then rebind to
work, but these will be addressed separately.

Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
include/linux/phy.h