summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-08-09 20:41:53 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-09 16:57:38 -0700
commit165b9117256c5432bf241fdf4637487e4af68cc8 (patch)
treea3b9bf7649435c8f1c5e6b4fcfd465938ff7d395 /net/core
parent62256f98f244fbb1c7a10465e1ee412f209d8978 (diff)
downloadlinux-stable-165b9117256c5432bf241fdf4637487e4af68cc8.tar.gz
linux-stable-165b9117256c5432bf241fdf4637487e4af68cc8.tar.bz2
linux-stable-165b9117256c5432bf241fdf4637487e4af68cc8.zip
net: call newid/getid without rtnl mutex held
Both functions take nsid_lock and don't rely on rtnl lock. Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/net_namespace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index a7f06d706aa0..6cfdc7c84c48 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -855,9 +855,10 @@ static int __init net_ns_init(void)
register_pernet_subsys(&net_ns_ops);
- rtnl_register(PF_UNSPEC, RTM_NEWNSID, rtnl_net_newid, NULL, 0);
+ rtnl_register(PF_UNSPEC, RTM_NEWNSID, rtnl_net_newid, NULL,
+ RTNL_FLAG_DOIT_UNLOCKED);
rtnl_register(PF_UNSPEC, RTM_GETNSID, rtnl_net_getid, rtnl_net_dumpid,
- 0);
+ RTNL_FLAG_DOIT_UNLOCKED);
return 0;
}