aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-02-09 18:59:32 -0800
committerDavid S. Miller <davem@davemloft.net>2022-02-10 15:30:26 +0000
commitede6c39c4f9068cbeb4036448c45fff5393e0432 (patch)
treedbeb843af969bdd903410d4ea5351db041893058 /include/net/net_namespace.h
parentqed: prevent a fw assert during device shutdown (diff)
downloadlinux-dev-ede6c39c4f9068cbeb4036448c45fff5393e0432.tar.xz
linux-dev-ede6c39c4f9068cbeb4036448c45fff5393e0432.zip
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;