]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commit25149ef9d25cafc4f4fe9f4461f18f876f397417
treeacc10c699ffcb5ceed825af9f051971f94387b09
parent7b9a88a390dacb37b051a7b09b9a08f546edf5eb
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