[PATCH net] net: spacemit: Hold RTNL lock in emac_resume() and emac_suspend()
Troy Mitchell
troy.mitchell at linux.spacemit.com
Fri Nov 6 01:43:13 PST 2026
On Thu, 5 Nov 2026 17:34:37 +0500, Ali Tariq wrote:
> @@ -2056,7 +2059,9 @@ static int emac_suspend(struct device *dev)
> return 0;
> }
>
> + rtnl_lock();
> emac_stop(ndev);
> + rtnl_unlock();
>
> clk_disable_unprepare(priv->bus_clk);
> netif_device_detach(ndev);
This can deadlock. emac_stop() -> emac_down() calls
cancel_work_sync(&priv->tx_timeout_task) with RTNL now held, while
emac_tx_timeout_task() starts with rtnl_lock().
--
Troy Mitchell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20261106/532b7b82/attachment.sig>
More information about the linux-riscv
mailing list