[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201123121837.188095386@linuxfoundation.org>
Date: Mon, 23 Nov 2020 13:19:43 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Christophe ROULLIER <christophe.roullier@...com>,
Alexandre TORGUE <alexandre.torgue@...com>,
Ong Boon Leong <boon.leong.ong@...el.com>,
Wong Vee Khee <vee.khee.wong@...el.com>,
Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH 5.9 033/252] net: stmmac: Use rtnl_lock/unlock on netif_set_real_num_rx_queues() call
From: Wong Vee Khee <vee.khee.wong@...el.com>
[ Upstream commit 8e5debed39017836a850c6c7bfacc93299d19bad ]
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@...com>
Tested-by: Christophe ROULLIER <christophe.roullier@...com>
Cc: Alexandre TORGUE <alexandre.torgue@...com>
Reviewed-by: Ong Boon Leong <boon.leong.ong@...el.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@...el.com>
Link: https://lore.kernel.org/r/20201115074210.23605-1-vee.khee.wong@intel.com
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5170,6 +5170,7 @@ int stmmac_resume(struct device *dev)
return ret;
}
+ rtnl_lock();
mutex_lock(&priv->lock);
stmmac_reset_queues_param(priv);
@@ -5185,6 +5186,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();
Powered by blists - more mailing lists