diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-01-26 23:14:49 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-01-29 17:40:38 +0300 |
commit | 723de3ebef03bc14bd72531f00f9094337654009 (patch) | |
tree | 687b08e8b5836320a66e811ef2043e509cf6828e /net/core/dev.h | |
parent | 9e1aa985d61eacd5931496b80fbd1c2d2cdeece5 (diff) | |
download | linux-723de3ebef03bc14bd72531f00f9094337654009.tar.xz |
net: free altname using an RCU callback
We had to add another synchronize_rcu() in recent fix.
Bite the bullet and add an rcu_head to netdev_name_node,
free from RCU.
Note that name_node does not hold any reference on dev
to which it points, but there must be a synchronize_rcu()
on device removal path, so we should be fine.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.h')
-rw-r--r-- | net/core/dev.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/dev.h b/net/core/dev.h index 7480b4c84298..a43dfe3de50e 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -56,6 +56,7 @@ struct netdev_name_node { struct list_head list; struct net_device *dev; const char *name; + struct rcu_head rcu; }; int netdev_get_name(struct net *net, char *name, int ifindex); |