Commit 4cd582ff authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17ef8efc
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment