summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorKirill Tkhai <ktkhai@virtuozzo.com>2018-03-22 10:45:40 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-22 20:12:56 +0100
commitd9ff3049739e349b5380b96226f9ad766741773d (patch)
tree0b09f0de0ff410fef91ad0224a241b322bd0eb05 /net/core
parentnet: Make ip_ra_chain per struct net (diff)
downloadlinux-d9ff3049739e349b5380b96226f9ad766741773d.tar.xz
linux-d9ff3049739e349b5380b96226f9ad766741773d.zip
net: Replace ip_ra_lock with per-net mutex
Since ra_chain is per-net, we may use per-net mutexes to protect them in ip_ra_control(). This improves scalability. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/net_namespace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index c340d5cfbdec..95ba2c53bd9a 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -301,6 +301,7 @@ static __net_init int setup_net(struct net *net, struct user_namespace *user_ns)
net->user_ns = user_ns;
idr_init(&net->netns_ids);
spin_lock_init(&net->nsid_lock);
+ mutex_init(&net->ipv4.ra_mutex);
list_for_each_entry(ops, &pernet_list, list) {
error = ops_init(ops, net);