[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240516230151.1031190-3-opendmb@gmail.com>
Date: Thu, 16 May 2024 16:01:50 -0700
From: Doug Berger <opendmb@...il.com>
To: stable@...r.kernel.org
Cc: Doug Berger <opendmb@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
bcm-kernel-feedback-list@...adcom.com,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Florian Fainelli <florian.fainelli@...adcom.com>
Subject: [PATCH stable 5.4 2/3] net: bcmgenet: synchronize use of bcmgenet_set_rx_mode()
[ Upstream commit 2dbe5f19368caae63b1f59f5bc2af78c7d522b3a ]
The ndo_set_rx_mode function is synchronized with the
netif_addr_lock spinlock and BHs disabled. Since this
function is also invoked directly from the driver the
same synchronization should be applied.
Fixes: 72f96347628e ("net: bcmgenet: set Rx mode before starting netif")
Cc: stable@...r.kernel.org
Signed-off-by: Doug Berger <opendmb@...il.com>
Acked-by: Florian Fainelli <florian.fainelli@...adcom.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index bf52bd643846..e34df8da65e7 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2874,7 +2874,9 @@ static void bcmgenet_netif_start(struct net_device *dev)
struct bcmgenet_priv *priv = netdev_priv(dev);
/* Start the network engine */
+ netif_addr_lock_bh(dev);
bcmgenet_set_rx_mode(dev);
+ netif_addr_unlock_bh(dev);
bcmgenet_enable_rx_napi(priv);
umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, true);
--
2.34.1
Powered by blists - more mailing lists