]> git.proxmox.com Git - mirror_ubuntu-artful-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)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 22 Aug 2017 09:58:15 +0000 (06:58 -0300)
commitf553e28b16cc9cf336500130281d9c01e02509a0
tree03e8d522c9baf1bb347c8b9960321cc4ecf22989
parent010c2730cdc85a759e6b992d4917ba880396ecde
net: phy: Fix PHY unbind crash

BugLink: http://bugs.launchpad.net/bugs/1711526
commit 7b9a88a390dacb37b051a7b09b9a08f546edf5eb upstream.

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>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/phy/phy_device.c