This patch starts to convert pernet_subsys, registered
from core initcalls.

Since net/socket.o is the first linked file in net/Makefile,
its core initcalls execute the first. sysctl_pernet_ops is
the first pernet_subsys, registered from sock_init(), so
it goes ahead of others, registered via core_initcall().

Methods sysctl_net_init() and sysctl_net_exit() initialize
net::sysctls of a namespace.

pernet_operations::init()/exit() methods from the rest
of the list do not touch net::sysctls of strangers,
so it's safe to execute sysctl_pernet_ops's methods
in parallel with any other pernet_operations.

Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com>
---
 net/sysctl_net.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index 9aed6fe1bf1a..1b91db88e54a 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -103,7 +103,7 @@ __init int net_sysctl_init(void)
        net_header = register_sysctl("net", empty);
        if (!net_header)
                goto out;
-       ret = register_pernet_subsys(&sysctl_pernet_ops);
+       ret = register_pernet_sys(&sysctl_pernet_ops);
        if (ret)
                goto out1;
 out:

Reply via email to