mirror of
https://github.com/torvalds/linux
synced 2024-10-16 08:19:01 +00:00
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: 686cff3d70
("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>
This commit is contained in:
parent
7a30ecc923
commit
8e5debed39
|
@ -5247,6 +5247,7 @@ int stmmac_resume(struct device *dev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rtnl_lock();
|
||||||
mutex_lock(&priv->lock);
|
mutex_lock(&priv->lock);
|
||||||
|
|
||||||
stmmac_reset_queues_param(priv);
|
stmmac_reset_queues_param(priv);
|
||||||
|
@ -5262,6 +5263,7 @@ int stmmac_resume(struct device *dev)
|
||||||
stmmac_enable_all_queues(priv);
|
stmmac_enable_all_queues(priv);
|
||||||
|
|
||||||
mutex_unlock(&priv->lock);
|
mutex_unlock(&priv->lock);
|
||||||
|
rtnl_unlock();
|
||||||
|
|
||||||
if (!device_may_wakeup(priv->device) || !priv->plat->pmt) {
|
if (!device_may_wakeup(priv->device) || !priv->plat->pmt) {
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
|
|
Loading…
Reference in a new issue