Skip to content

Commit 8e5debe

Browse files
wvk86kuba-moo
authored andcommitted
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: 686cff3 ("net: stmmac: Fix incorrect location to set real_num_rx|tx_queues") Reported-by: Christophe ROULLIER <christophe.roullier@st.com> Tested-by: Christophe ROULLIER <christophe.roullier@st.com> Cc: Alexandre TORGUE <alexandre.torgue@st.com> Reviewed-by: Ong Boon Leong <boon.leong.ong@intel.com> Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com> Link: https://lore.kernel.org/r/20201115074210.23605-1-vee.khee.wong@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 7a30ecc commit 8e5debe

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5247,6 +5247,7 @@ int stmmac_resume(struct device *dev)
52475247
return ret;
52485248
}
52495249

5250+
rtnl_lock();
52505251
mutex_lock(&priv->lock);
52515252

52525253
stmmac_reset_queues_param(priv);
@@ -5262,6 +5263,7 @@ int stmmac_resume(struct device *dev)
52625263
stmmac_enable_all_queues(priv);
52635264

52645265
mutex_unlock(&priv->lock);
5266+
rtnl_unlock();
52655267

52665268
if (!device_may_wakeup(priv->device) || !priv->plat->pmt) {
52675269
rtnl_lock();

0 commit comments

Comments
 (0)