netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: mvneta: fix locking in mvneta_cpu_online()
@ 2025-01-21  0:50 Harshit Mogalapalli
  2025-01-21  0:53 ` Harshit Mogalapalli
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Harshit Mogalapalli @ 2025-01-21  0:50 UTC (permalink / raw)
  To: Marcin Wojtas, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Francois Romieu, Kuniyuki Iwashima,
	netdev, linux-kernel
  Cc: dan.carpenter, kernel-janitors, error27, harshit.m.mogalapalli

When port is stopped, unlock before returning

Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
This is based on static analysis, only compile tested
---
 drivers/net/ethernet/marvell/mvneta.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 82f4333fb426..4fe121b9f94b 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4432,6 +4432,7 @@ static int mvneta_cpu_online(unsigned int cpu, struct hlist_node *node)
 	 */
 	if (pp->is_stopped) {
 		spin_unlock(&pp->lock);
+		netdev_unlock(port->napi.dev);
 		return 0;
 	}
 	netif_tx_stop_all_queues(pp->dev);
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-23 15:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-21  0:50 [PATCH] net: mvneta: fix locking in mvneta_cpu_online() Harshit Mogalapalli
2025-01-21  0:53 ` Harshit Mogalapalli
2025-01-21  1:04   ` Jakub Kicinski
2025-01-21  9:53 ` Simon Horman
2025-01-23 15:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).