Skip to content
/ linux Public

Commit 3267bcb

Browse files
zlatistivgregkh
authored andcommitted
net: usb: aqc111: Do not perform PM inside suspend callback
[ Upstream commit 069c8f5 ] syzbot reports "task hung in rpm_resume" This is caused by aqc111_suspend calling the PM variant of its write_cmd routine. The simplified call trace looks like this: rpm_suspend() usb_suspend_both() - here udev->dev.power.runtime_status == RPM_SUSPENDING aqc111_suspend() - called for the usb device interface aqc111_write32_cmd() usb_autopm_get_interface() pm_runtime_resume_and_get() rpm_resume() - here we call rpm_resume() on our parent rpm_resume() - Here we wait for a status change that will never happen. At this point we block another task which holds rtnl_lock and locks up the whole networking stack. Fix this by replacing the write_cmd calls with their _nopm variants Reported-by: syzbot+48dc1e8dfc92faf1124c@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=48dc1e8dfc92faf1124c Fixes: e58ba45 ("net: usb: aqc111: Add support for wake on LAN by MAGIC packet") Signed-off-by: Nikola Z. Ivanov <zlatistiv@gmail.com> Link: https://patch.msgid.link/20260313141643.1181386-1-zlatistiv@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 37bef86 commit 3267bcb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/net/usb/aqc111.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,14 +1400,14 @@ static int aqc111_suspend(struct usb_interface *intf, pm_message_t message)
14001400
aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC,
14011401
SFR_MEDIUM_STATUS_MODE, 2, &reg16);
14021402

1403-
aqc111_write_cmd(dev, AQ_WOL_CFG, 0, 0,
1404-
WOL_CFG_SIZE, &wol_cfg);
1405-
aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0,
1406-
&aqc111_data->phy_cfg);
1403+
aqc111_write_cmd_nopm(dev, AQ_WOL_CFG, 0, 0,
1404+
WOL_CFG_SIZE, &wol_cfg);
1405+
aqc111_write32_cmd_nopm(dev, AQ_PHY_OPS, 0, 0,
1406+
&aqc111_data->phy_cfg);
14071407
} else {
14081408
aqc111_data->phy_cfg |= AQ_LOW_POWER;
1409-
aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0,
1410-
&aqc111_data->phy_cfg);
1409+
aqc111_write32_cmd_nopm(dev, AQ_PHY_OPS, 0, 0,
1410+
&aqc111_data->phy_cfg);
14111411

14121412
/* Disable RX path */
14131413
aqc111_read16_cmd_nopm(dev, AQ_ACCESS_MAC,

0 commit comments

Comments
 (0)