mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
bc8a36942a
commit
2ca794e5e8
3 changed files with 12 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue