diff options
author | Wong Vee Khee <[email protected]> | 2020-11-15 15:42:10 +0800 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2020-11-16 16:12:36 -0800 |
commit | 8e5debed39017836a850c6c7bfacc93299d19bad (patch) | |
tree | eddd74caf98f5c54e767df6b53e8909c68d8b0c6 | |
parent | 7a30ecc9237681bb125cbd30eee92bef7e86293d (diff) |
net: stmmac: Use rtnl_lock/unlock on netif_set_real_num_rx_queues() call
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 <[email protected]>
Tested-by: Christophe ROULLIER <[email protected]>
Cc: Alexandre TORGUE <[email protected]>
Reviewed-by: Ong Boon Leong <[email protected]>
Signed-off-by: Wong Vee Khee <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index d833908b660a..ba45fe237512 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -5247,6 +5247,7 @@ int stmmac_resume(struct device *dev) return ret; } + rtnl_lock(); mutex_lock(&priv->lock); stmmac_reset_queues_param(priv); @@ -5262,6 +5263,7 @@ int stmmac_resume(struct device *dev) stmmac_enable_all_queues(priv); mutex_unlock(&priv->lock); + rtnl_unlock(); if (!device_may_wakeup(priv->device) || !priv->plat->pmt) { rtnl_lock(); |