From 2ca794e5e86c800d7f98c4ebb8bd325099c0afe8 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Thu, 19 Apr 2012 13:20:32 +0000 Subject: net sysctl: Initialize the network sysctls sooner to avoid problems. If the netfilter code is modified to use register_net_sysctl_table the kernel fails to boot because the per net sysctl infrasturce is not setup soon enough. So to avoid races call net_sysctl_init from sock_init(). Signed-off-by: Eric W. Biederman Acked-by: Pavel Emelyanov Signed-off-by: David S. Miller --- net/sysctl_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/sysctl_net.c') diff --git a/net/sysctl_net.c b/net/sysctl_net.c index 2b2986dd04ae..ce97237b653f 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c @@ -89,7 +89,7 @@ static struct pernet_operations sysctl_pernet_ops = { }; static struct ctl_table_header *net_header; -static __init int net_sysctl_init(void) +__init int net_sysctl_init(void) { static struct ctl_table empty[1]; int ret = -ENOMEM; @@ -109,7 +109,6 @@ static __init int net_sysctl_init(void) out: return ret; } -subsys_initcall(net_sysctl_init); struct ctl_table_header *register_net_sysctl_table(struct net *net, const struct ctl_path *path, struct ctl_table *table) -- cgit v1.2.3