]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Oct 2019 00:21:26 +0000 (17:21 -0700)
commit584251261ca662888b1141e19c4a6c863196da37
tree62c042685081aea0bdede5f09818c4bd54e0a1f8
parent27d64b0a307729c1741cc6b6e6855324e180b2a1
net: stmmac: Avoid deadlock on suspend/resume

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: 346fd509e3af ("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>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c