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 /drivers | |
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 'drivers')
-rw-r--r-- | drivers/infiniband/core/ucma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 5861cdb22b7c..9f3e2beec91d 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c | |||
@@ -1392,7 +1392,7 @@ static int __init ucma_init(void) | |||
1392 | goto err1; | 1392 | goto err1; |
1393 | } | 1393 | } |
1394 | 1394 | ||
1395 | ucma_ctl_table_hdr = register_sysctl_paths(ucma_ctl_path, ucma_ctl_table); | 1395 | ucma_ctl_table_hdr = register_net_sysctl_table(&init_net, ucma_ctl_path, ucma_ctl_table); |
1396 | if (!ucma_ctl_table_hdr) { | 1396 | if (!ucma_ctl_table_hdr) { |
1397 | printk(KERN_ERR "rdma_ucm: couldn't register sysctl paths\n"); | 1397 | printk(KERN_ERR "rdma_ucm: couldn't register sysctl paths\n"); |
1398 | ret = -ENOMEM; | 1398 | ret = -ENOMEM; |
@@ -1408,7 +1408,7 @@ err1: | |||
1408 | 1408 | ||
1409 | static void __exit ucma_cleanup(void) | 1409 | static void __exit ucma_cleanup(void) |
1410 | { | 1410 | { |
1411 | unregister_sysctl_table(ucma_ctl_table_hdr); | 1411 | unregister_net_sysctl_table(ucma_ctl_table_hdr); |
1412 | device_remove_file(ucma_misc.this_device, &dev_attr_abi_version); | 1412 | device_remove_file(ucma_misc.this_device, &dev_attr_abi_version); |
1413 | misc_deregister(&ucma_misc); | 1413 | misc_deregister(&ucma_misc); |
1414 | idr_destroy(&ctx_idr); | 1414 | idr_destroy(&ctx_idr); |