]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: call newid/getid without rtnl mutex held
authorFlorian Westphal <fw@strlen.de>
Wed, 9 Aug 2017 18:41:53 +0000 (20:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Aug 2017 23:57:38 +0000 (16:57 -0700)
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>
net/core/net_namespace.c

index a7f06d706aa0360db27214d308ca9d2f9c3fb587..6cfdc7c84c480f41b784f417d28f7a622c296e81 100644 (file)
@@ -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;
 }