[PATCH net 1/1] net: stmmac: Use rtnl_lock/unlock on netif_set_real_num_rx_queues() call
Wong Vee Khee
vee.khee.wong at intel.com
Thu Nov 12 09:49:48 EST 2020
Fix an issue where dump stack is printed on suspend resume flow due to
netif_set_real_num_rx_queues() is not called with rtnl_lock held().
Fixes: 686cff3d7022 ("net: stmmac: Fix incorrect location to set real_num_rx|tx_queues")
Reported-by: Christophe ROULLIER <christophe.roullier at st.com>
Tested-by: Christophe ROULLIER <christophe.roullier at st.com>
Cc: Alexandre TORGUE <alexandre.torgue at st.com>
Reviewed-by: Ong Boon Leong <boon.leong.ong at intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong at intel.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index ba855465a2db..33e280040000 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5278,7 +5278,10 @@ int stmmac_resume(struct device *dev)
stmmac_clear_descriptors(priv);
+ rtnl_lock();
stmmac_hw_setup(ndev, false);
+ rtnl_unlock();
+
stmmac_init_coalesce(priv);
stmmac_set_rx_mode(ndev);
--
2.17.0
More information about the linux-arm-kernel
mailing list