diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-04-19 13:20:32 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-20 21:21:16 -0400 |
commit | 2ca794e5e86c800d7f98c4ebb8bd325099c0afe8 (patch) | |
tree | f0ae38f58dec5a07ae57e31aca4943c85ffe9d65 /include/net/net_namespace.h | |
parent | bc8a36942a5c05896d373a8e98d5e6b14514b4bc (diff) | |
download | op-kernel-dev-2ca794e5e86c800d7f98c4ebb8bd325099c0afe8.zip op-kernel-dev-2ca794e5e86c800d7f98c4ebb8bd325099c0afe8.tar.gz |
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 <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 446245e..767dcd40 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -283,6 +283,11 @@ struct ctl_path; struct ctl_table; struct ctl_table_header; +#ifdef CONFIG_SYSCTL +extern int net_sysctl_init(void); +#else +static inline int net_sysctl_init(void) { return 0; } +#endif extern struct ctl_table_header *register_net_sysctl_table(struct net *net, const struct ctl_path *path, struct ctl_table *table); extern struct ctl_table_header *register_net_sysctl_rotable( |