aboutsummaryrefslogtreecommitdiffstats
path: root/net/sysctl_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sysctl_net.c')
-rw-r--r--net/sysctl_net.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index e998c6448046..c3e65aebecc0 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -105,19 +105,15 @@ subsys_initcall(net_sysctl_init);
105struct ctl_table_header *register_net_sysctl_table(struct net *net, 105struct ctl_table_header *register_net_sysctl_table(struct net *net,
106 const struct ctl_path *path, struct ctl_table *table) 106 const struct ctl_path *path, struct ctl_table *table)
107{ 107{
108 struct nsproxy namespaces; 108 return __register_sysctl_paths(&net->sysctls, path, table);
109 namespaces = *current->nsproxy;
110 namespaces.net_ns = net;
111 return __register_sysctl_paths(&net_sysctl_root,
112 &namespaces, path, table);
113} 109}
114EXPORT_SYMBOL_GPL(register_net_sysctl_table); 110EXPORT_SYMBOL_GPL(register_net_sysctl_table);
115 111
116struct ctl_table_header *register_net_sysctl_rotable(const 112struct ctl_table_header *register_net_sysctl_rotable(const
117 struct ctl_path *path, struct ctl_table *table) 113 struct ctl_path *path, struct ctl_table *table)
118{ 114{
119 return __register_sysctl_paths(&net_sysctl_ro_root, 115 return __register_sysctl_paths(&net_sysctl_ro_root.default_set,
120 &init_nsproxy, path, table); 116 path, table);
121} 117}
122EXPORT_SYMBOL_GPL(register_net_sysctl_rotable); 118EXPORT_SYMBOL_GPL(register_net_sysctl_rotable);
123 119