diff options
| author | Ali Tariq <alitariq45892@gmail.com> | 2026-11-13 18:24:34 +0500 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-17 17:57:30 -0800 |
| commit | 0dcf21648f258d2be36def2aacc8c7ee5e15e2ee (patch) | |
| tree | 0ac6daff1c749a9ff40118d656c91d8261a2b8c9 /tools/perf/scripts/python | |
| parent | 9c9863f9b9f120b771a908849157791a32eadb02 (diff) | |
net: spacemit: Fix TX timeout work deadlocking on itself
emac_tx_timeout_task() takes RTNL and calls dev_close(), which ends up
waiting for the work itself. The function call hierarchy is as follows
emac_tx_timeout_task()
dev_close()
emac_stop()
emac_down()
cancel_work_sync(&priv->tx_timeout_task)
The work never finishes and keeps RTNL held, so after a TX timeout
everything that needs RTNL hangs.
Remove cancel_work_sync() from emac_down(). Disable the work in
emac_suspend() instead, and enable it again in emac_resume(). emac_remove()
runs before the devm-managed unregister_netdev(), so use
disable_work_sync() there to stop the work from being queued again.
Found by code inspection. Not reproduced on hardware. Tested on Orange
Pi RV2 (SpacemiT K1) with suspend/resume cycles and kselftest, with
lockdep enabled.
Fixes: bfec6d7f2001 ("net: spacemit: Add K1 Ethernet MAC")
Reported-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Closes: https://lore.kernel.org/all/DMO74K2MG3D7.15UUOU1O66K6N@linux.spacemit.com/
Suggested-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Ali Tariq <alitariq45892@gmail.com>
Reviewed-by: Vivian Wang <wangruikang@iscas.ac.cn>
Reviewed-by: Muhammad Bilal <meatuni001@gmail.com>
Link: https://patch.msgid.link/20261113132435.434615-2-alitariq45892@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
