diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-04-19 09:24:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-20 21:21:17 -0400 |
commit | 5dd3df105b9f6cb7dd2472b59e028d0d1c878ecb (patch) | |
tree | b12606e6e74ee6d07823eb268e09d899946279fd /net/rds/iw_sysctl.c | |
parent | 4344475797a16ef948385780943f7a5cf09f0675 (diff) |
net: Move all of the network sysctls without a namespace into init_net.
This makes it clearer which sysctls are relative to your current network
namespace.
This makes it a little less error prone by not exposing sysctls for the
initial network namespace in other namespaces.
This is the same way we handle all of our other network interfaces to
userspace and I can't honestly remember why we didn't do this for
sysctls right from the start.
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 'net/rds/iw_sysctl.c')
-rw-r--r-- | net/rds/iw_sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/iw_sysctl.c b/net/rds/iw_sysctl.c index e2e47176e729..bcfe36dc55a7 100644 --- a/net/rds/iw_sysctl.c +++ b/net/rds/iw_sysctl.c | |||
@@ -119,12 +119,12 @@ static struct ctl_path rds_iw_sysctl_path[] = { | |||
119 | void rds_iw_sysctl_exit(void) | 119 | void rds_iw_sysctl_exit(void) |
120 | { | 120 | { |
121 | if (rds_iw_sysctl_hdr) | 121 | if (rds_iw_sysctl_hdr) |
122 | unregister_sysctl_table(rds_iw_sysctl_hdr); | 122 | unregister_net_sysctl_table(rds_iw_sysctl_hdr); |
123 | } | 123 | } |
124 | 124 | ||
125 | int rds_iw_sysctl_init(void) | 125 | int rds_iw_sysctl_init(void) |
126 | { | 126 | { |
127 | rds_iw_sysctl_hdr = register_sysctl_paths(rds_iw_sysctl_path, rds_iw_sysctl_table); | 127 | rds_iw_sysctl_hdr = register_net_sysctl_table(&init_net, rds_iw_sysctl_path, rds_iw_sysctl_table); |
128 | if (!rds_iw_sysctl_hdr) | 128 | if (!rds_iw_sysctl_hdr) |
129 | return -ENOMEM; | 129 | return -ENOMEM; |
130 | return 0; | 130 | return 0; |