]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Fix PHY unbind crash
authorFlorian Fainelli <f.fainelli@gmail.com>
Sat, 18 Feb 2017 00:07:33 +0000 (16:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2017 15:15:11 +0000 (10:15 -0500)
commit219fac061d58eeaf13c7faf7da897b00c015000c
treef0fa1a1f8d52494f4f60b6aea4a098e2969a1753
parent6d1248d76fe3284844c66819506744b2b685ff8e
net: phy: Fix PHY unbind crash

The PHY library does not deal very well with bind and unbind events. The first
thing we would see is that we were not properly canceling the PHY state machine
workqueue, so we would be crashing while dereferencing phydev->drv since there
is no driver attached anymore.

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_device.c