summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/qsemi.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2016-11-28 15:18:31 +0100
committerDavid S. Miller <davem@davemloft.net>2016-11-30 02:35:24 +0100
commit0075bd692dca037108fd8b5d90a68d34bad4c2f8 (patch)
treee944e0663f0535a97b35bfb0cb69bbe6ea89320e /drivers/net/phy/qsemi.c
parentstmmac: fix comments, make debug output consistent (diff)
downloadlinux-0075bd692dca037108fd8b5d90a68d34bad4c2f8.tar.xz
linux-0075bd692dca037108fd8b5d90a68d34bad4c2f8.zip
net: phy: Fix use after free in phy_detach()
If device_release_driver(&phydev->mdio.dev) is called, it releases all resources belonging to the PHY device. Hence the subsequent call to phy_led_triggers_unregister() will access already freed memory when unregistering the LEDs. Move the call to phy_led_triggers_unregister() before the possible call to device_release_driver() to fix this. Fixes: 2e0bc452f4721520 ("net: phy: leds: add support for led triggers on phy link state change") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Zach Brown <zach.brown@ni.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/qsemi.c')
0 files changed, 0 insertions, 0 deletions