]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: stmmac: Avoid deadlock on suspend/resume
authorThierry Reding <treding@nvidia.com>
Wed, 2 Oct 2019 14:49:46 +0000 (16:49 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:46:18 +0000 (18:46 +0100)
commit094a365311d9c5a7344edfacc1baf98e81c2e41f
treeaa549f4d81ead2b44ad469eb1c874b51250e6798
parent091c1c50ab52419255ea46560740db1127bf67f4
net: stmmac: Avoid deadlock on suspend/resume

BugLink: https://bugs.launchpad.net/bugs/1850456
[ Upstream commit 134cc4cefad34d8d24670d8a911b59c3b89c6731 ]

The stmmac driver will try to acquire its private mutex during suspend
via phylink_resolve() -> stmmac_mac_link_down() -> stmmac_eee_init().
However, the phylink configuration is updated with the private mutex
held already, which causes a deadlock during suspend.

Fix this by moving the phylink configuration updates out of the region
of code protected by the private mutex.

Fixes: 19e13cb27b99 ("net: stmmac: Hold rtnl lock in suspend/resume callbacks")
Suggested-by: Bitan Biswas <bbiswas@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c