summaryrefslogtreecommitdiff
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-02-10 05:59:32 +0300
committerDavid S. Miller <davem@davemloft.net>2022-02-10 18:30:26 +0300
commitede6c39c4f9068cbeb4036448c45fff5393e0432 (patch)
treedbeb843af969bdd903410d4ea5351db041893058 /include/net/net_namespace.h
parentca2d5f1ff05955da9506055e88c4bbb71da190f1 (diff)
downloadlinux-ede6c39c4f9068cbeb4036448c45fff5393e0432.tar.xz
net: make net->dev_unreg_count atomic
Having to acquire rtnl from netdev_run_todo() for every dismantled device is not desirable when/if rtnl is under stress. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 374cc7b260fc..c4f5601f6e32 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -63,7 +63,7 @@ struct net {
*/
spinlock_t rules_mod_lock;
- unsigned int dev_unreg_count;
+ atomic_t dev_unreg_count;
unsigned int dev_base_seq; /* protected by rtnl_mutex */
int ifindex;