mirror of
https://github.com/torvalds/linux.git
synced 2026-08-06 23:43:54 +02:00
Since the blamed commit, phy_ethtool_get_wol() and phy_ethtool_set_wol()
acquire phydev->lock, but the mscc phy driver implementations,
vsc85xx_wol_get() and vsc85xx_wol_set(), acquire the same lock as well,
resulting in a deadlock.
$ ip link set swp3 down
============================================
WARNING: possible recursive locking detected
mscc_felix 0000:00:00.5 swp3: Link is Down
--------------------------------------------
ip/375 is trying to acquire lock:
ffff3d7e82e987a8 (&dev->lock){+.+.}-{4:4}, at: vsc85xx_wol_get+0x2c/0xf4
but task is already holding lock:
ffff3d7e82e987a8 (&dev->lock){+.+.}-{4:4}, at: phy_ethtool_get_wol+0x3c/0x6c
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&dev->lock);
lock(&dev->lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
2 locks held by ip/375:
#0: ffffd43b2a955788 (rtnl_mutex){+.+.}-{4:4}, at: rtnetlink_rcv_msg+0x144/0x58c
#1: ffff3d7e82e987a8 (&dev->lock){+.+.}-{4:4}, at: phy_ethtool_get_wol+0x3c/0x6c
Call trace:
__mutex_lock+0x98/0x454
mutex_lock_nested+0x2c/0x38
vsc85xx_wol_get+0x2c/0xf4
phy_ethtool_get_wol+0x50/0x6c
phy_suspend+0x84/0xcc
phy_state_machine+0x1b8/0x27c
phy_stop+0x70/0x154
phylink_stop+0x34/0xc0
dsa_port_disable_rt+0x2c/0xa4
dsa_slave_close+0x38/0xec
__dev_close_many+0xc8/0x16c
__dev_change_flags+0xdc/0x218
dev_change_flags+0x24/0x6c
do_setlink+0x234/0xea4
__rtnl_newlink+0x46c/0x878
rtnl_newlink+0x50/0x7c
rtnetlink_rcv_msg+0x16c/0x58c
Removing the mutex_lock(&phydev->lock) calls from the driver restores
the functionality.
Fixes:
|
||
|---|---|---|
| .. | ||
| mscc | ||
| adin.c | ||
| adin1100.c | ||
| amd.c | ||
| aquantia_hwmon.c | ||
| aquantia_main.c | ||
| aquantia.h | ||
| at803x.c | ||
| ax88796b.c | ||
| bcm-cygnus.c | ||
| bcm-phy-lib.c | ||
| bcm-phy-lib.h | ||
| bcm-phy-ptp.c | ||
| bcm7xxx.c | ||
| bcm63xx.c | ||
| bcm87xx.c | ||
| bcm54140.c | ||
| bcm84881.c | ||
| broadcom.c | ||
| cicada.c | ||
| cortina.c | ||
| davicom.c | ||
| dp83tc811.c | ||
| dp83td510.c | ||
| dp83640_reg.h | ||
| dp83640.c | ||
| dp83822.c | ||
| dp83848.c | ||
| dp83867.c | ||
| dp83869.c | ||
| et1011c.c | ||
| fixed_phy.c | ||
| icplus.c | ||
| intel-xway.c | ||
| Kconfig | ||
| linkmode.c | ||
| lxt.c | ||
| Makefile | ||
| marvell-88x2222.c | ||
| marvell.c | ||
| marvell10g.c | ||
| mdio_bus.c | ||
| mdio_device.c | ||
| mdio_devres.c | ||
| mdio-boardinfo.c | ||
| mdio-boardinfo.h | ||
| mdio-open-alliance.h | ||
| mediatek-ge.c | ||
| meson-gxl.c | ||
| micrel.c | ||
| microchip_t1.c | ||
| microchip.c | ||
| mii_timestamper.c | ||
| motorcomm.c | ||
| mxl-gpy.c | ||
| national.c | ||
| ncn26000.c | ||
| nxp-c45-tja11xx.c | ||
| nxp-tja11xx.c | ||
| phy_device.c | ||
| phy_led_triggers.c | ||
| phy-c45.c | ||
| phy-core.c | ||
| phy.c | ||
| phylink.c | ||
| qsemi.c | ||
| realtek.c | ||
| rockchip.c | ||
| sfp-bus.c | ||
| sfp.c | ||
| sfp.h | ||
| smsc.c | ||
| spi_ks8995.c | ||
| ste10Xp.c | ||
| swphy.c | ||
| swphy.h | ||
| teranetics.c | ||
| uPD60620.c | ||
| vitesse.c | ||
| xilinx_gmii2rgmii.c | ||