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>
This commit is contained in:
committed by
David S. Miller
parent
bc8a36942a
commit
2ca794e5e8
@@ -2524,6 +2524,12 @@ EXPORT_SYMBOL(sock_unregister);
|
||||
static int __init sock_init(void)
|
||||
{
|
||||
int err;
|
||||
/*
|
||||
* Initialize the network sysctl infrastructure.
|
||||
*/
|
||||
err = net_sysctl_init();
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Initialize sock SLAB cache.
|
||||
|
||||
Reference in New Issue
Block a user