[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240209153101.3824155-3-edumazet@google.com>
Date: Fri, 9 Feb 2024 15:30:57 +0000
From: Eric Dumazet <edumazet@...gle.com>
To: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: David Ahern <dsahern@...nel.org>, Pablo Neira Ayuso <pablo@...filter.org>,
Florian Westphal <fw@...len.de>, netdev@...r.kernel.org, eric.dumazet@...il.com,
Eric Dumazet <edumazet@...gle.com>
Subject: [PATCH net-next 2/6] net: use synchronize_net() in dev_change_name()
dev_change_name() holds RTNL, we better use synchronize_net()
instead of plain synchronize_rcu().
Signed-off-by: Eric Dumazet <edumazet@...gle.com>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index e52e2888cccd37e0df794155004e77261c812ef9..cb0eaefa0aff79ddf009f0867b440200fa985e54 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1239,7 +1239,7 @@ int dev_change_name(struct net_device *dev, const char *newname)
netdev_name_node_del(dev->name_node);
write_unlock(&dev_base_lock);
- synchronize_rcu();
+ synchronize_net();
write_lock(&dev_base_lock);
netdev_name_node_add(net, dev->name_node);
--
2.43.0.687.g38aa6559b0-goog
Powered by blists - more mailing lists