diff options
Diffstat (limited to 'net')
65 files changed, 261 insertions, 197 deletions
diff --git a/net/802/tr.c b/net/802/tr.c index e56e61a7f545..032c31e748eb 100644 --- a/net/802/tr.c +++ b/net/802/tr.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <net/arp.h> | 38 | #include <net/arp.h> |
39 | #include <net/net_namespace.h> | ||
39 | 40 | ||
40 | static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev); | 41 | static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev); |
41 | static void rif_check_expire(unsigned long dummy); | 42 | static void rif_check_expire(unsigned long dummy); |
@@ -639,7 +640,7 @@ static int __init rif_init(void) | |||
639 | rif_timer.function = rif_check_expire; | 640 | rif_timer.function = rif_check_expire; |
640 | add_timer(&rif_timer); | 641 | add_timer(&rif_timer); |
641 | 642 | ||
642 | proc_net_fops_create("tr_rif", S_IRUGO, &rif_seq_fops); | 643 | proc_net_fops_create(&init_net, "tr_rif", S_IRUGO, &rif_seq_fops); |
643 | return 0; | 644 | return 0; |
644 | } | 645 | } |
645 | 646 | ||
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index bd08aa090763..ac80e6b9ef53 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
34 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
35 | #include <linux/if_vlan.h> | 35 | #include <linux/if_vlan.h> |
36 | #include <net/net_namespace.h> | ||
36 | #include "vlanproc.h" | 37 | #include "vlanproc.h" |
37 | #include "vlan.h" | 38 | #include "vlan.h" |
38 | 39 | ||
@@ -143,7 +144,7 @@ void vlan_proc_cleanup(void) | |||
143 | remove_proc_entry(name_conf, proc_vlan_dir); | 144 | remove_proc_entry(name_conf, proc_vlan_dir); |
144 | 145 | ||
145 | if (proc_vlan_dir) | 146 | if (proc_vlan_dir) |
146 | proc_net_remove(name_root); | 147 | proc_net_remove(&init_net, name_root); |
147 | 148 | ||
148 | /* Dynamically added entries should be cleaned up as their vlan_device | 149 | /* Dynamically added entries should be cleaned up as their vlan_device |
149 | * is removed, so we should not have to take care of it here... | 150 | * is removed, so we should not have to take care of it here... |
@@ -156,7 +157,7 @@ void vlan_proc_cleanup(void) | |||
156 | 157 | ||
157 | int __init vlan_proc_init(void) | 158 | int __init vlan_proc_init(void) |
158 | { | 159 | { |
159 | proc_vlan_dir = proc_mkdir(name_root, proc_net); | 160 | proc_vlan_dir = proc_mkdir(name_root, init_net.proc_net); |
160 | if (proc_vlan_dir) { | 161 | if (proc_vlan_dir) { |
161 | proc_vlan_conf = create_proc_entry(name_conf, | 162 | proc_vlan_conf = create_proc_entry(name_conf, |
162 | S_IFREG|S_IRUSR|S_IWUSR, | 163 | S_IFREG|S_IRUSR|S_IWUSR, |
diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c index 87a582cc8111..05d9652afcb6 100644 --- a/net/appletalk/atalk_proc.c +++ b/net/appletalk/atalk_proc.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/proc_fs.h> | 12 | #include <linux/proc_fs.h> |
13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <net/net_namespace.h> | ||
14 | #include <net/sock.h> | 15 | #include <net/sock.h> |
15 | #include <linux/atalk.h> | 16 | #include <linux/atalk.h> |
16 | 17 | ||
@@ -271,7 +272,7 @@ int __init atalk_proc_init(void) | |||
271 | struct proc_dir_entry *p; | 272 | struct proc_dir_entry *p; |
272 | int rc = -ENOMEM; | 273 | int rc = -ENOMEM; |
273 | 274 | ||
274 | atalk_proc_dir = proc_mkdir("atalk", proc_net); | 275 | atalk_proc_dir = proc_mkdir("atalk", init_net.proc_net); |
275 | if (!atalk_proc_dir) | 276 | if (!atalk_proc_dir) |
276 | goto out; | 277 | goto out; |
277 | atalk_proc_dir->owner = THIS_MODULE; | 278 | atalk_proc_dir->owner = THIS_MODULE; |
@@ -306,7 +307,7 @@ out_socket: | |||
306 | out_route: | 307 | out_route: |
307 | remove_proc_entry("interface", atalk_proc_dir); | 308 | remove_proc_entry("interface", atalk_proc_dir); |
308 | out_interface: | 309 | out_interface: |
309 | remove_proc_entry("atalk", proc_net); | 310 | remove_proc_entry("atalk", init_net.proc_net); |
310 | goto out; | 311 | goto out; |
311 | } | 312 | } |
312 | 313 | ||
@@ -316,5 +317,5 @@ void __exit atalk_proc_exit(void) | |||
316 | remove_proc_entry("route", atalk_proc_dir); | 317 | remove_proc_entry("route", atalk_proc_dir); |
317 | remove_proc_entry("socket", atalk_proc_dir); | 318 | remove_proc_entry("socket", atalk_proc_dir); |
318 | remove_proc_entry("arp", atalk_proc_dir); | 319 | remove_proc_entry("arp", atalk_proc_dir); |
319 | remove_proc_entry("atalk", proc_net); | 320 | remove_proc_entry("atalk", init_net.proc_net); |
320 | } | 321 | } |
diff --git a/net/atm/proc.c b/net/atm/proc.c index 99fc1fe950ee..3a6be64b0512 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
23 | #include <linux/atmclip.h> | 23 | #include <linux/atmclip.h> |
24 | #include <linux/init.h> /* for __init */ | 24 | #include <linux/init.h> /* for __init */ |
25 | #include <net/net_namespace.h> | ||
25 | #include <net/atmclip.h> | 26 | #include <net/atmclip.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
27 | #include <asm/atomic.h> | 28 | #include <asm/atomic.h> |
@@ -475,7 +476,7 @@ static void atm_proc_dirs_remove(void) | |||
475 | if (e->dirent) | 476 | if (e->dirent) |
476 | remove_proc_entry(e->name, atm_proc_root); | 477 | remove_proc_entry(e->name, atm_proc_root); |
477 | } | 478 | } |
478 | remove_proc_entry("net/atm", NULL); | 479 | remove_proc_entry("atm", init_net.proc_net); |
479 | } | 480 | } |
480 | 481 | ||
481 | int __init atm_proc_init(void) | 482 | int __init atm_proc_init(void) |
@@ -483,7 +484,7 @@ int __init atm_proc_init(void) | |||
483 | static struct atm_proc_entry *e; | 484 | static struct atm_proc_entry *e; |
484 | int ret; | 485 | int ret; |
485 | 486 | ||
486 | atm_proc_root = proc_mkdir("net/atm",NULL); | 487 | atm_proc_root = proc_mkdir("atm", init_net.proc_net); |
487 | if (!atm_proc_root) | 488 | if (!atm_proc_root) |
488 | goto err_out; | 489 | goto err_out; |
489 | for (e = atm_proc_ents; e->name; e++) { | 490 | for (e = atm_proc_ents; e->name; e++) { |
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index dae2a42d3d86..1d71f85680b8 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/sysctl.h> | 44 | #include <linux/sysctl.h> |
45 | #include <linux/init.h> | 45 | #include <linux/init.h> |
46 | #include <linux/spinlock.h> | 46 | #include <linux/spinlock.h> |
47 | #include <net/net_namespace.h> | ||
47 | #include <net/tcp_states.h> | 48 | #include <net/tcp_states.h> |
48 | #include <net/ip.h> | 49 | #include <net/ip.h> |
49 | #include <net/arp.h> | 50 | #include <net/arp.h> |
@@ -1998,9 +1999,9 @@ static int __init ax25_init(void) | |||
1998 | register_netdevice_notifier(&ax25_dev_notifier); | 1999 | register_netdevice_notifier(&ax25_dev_notifier); |
1999 | ax25_register_sysctl(); | 2000 | ax25_register_sysctl(); |
2000 | 2001 | ||
2001 | proc_net_fops_create("ax25_route", S_IRUGO, &ax25_route_fops); | 2002 | proc_net_fops_create(&init_net, "ax25_route", S_IRUGO, &ax25_route_fops); |
2002 | proc_net_fops_create("ax25", S_IRUGO, &ax25_info_fops); | 2003 | proc_net_fops_create(&init_net, "ax25", S_IRUGO, &ax25_info_fops); |
2003 | proc_net_fops_create("ax25_calls", S_IRUGO, &ax25_uid_fops); | 2004 | proc_net_fops_create(&init_net, "ax25_calls", S_IRUGO, &ax25_uid_fops); |
2004 | out: | 2005 | out: |
2005 | return rc; | 2006 | return rc; |
2006 | } | 2007 | } |
@@ -2014,9 +2015,9 @@ MODULE_ALIAS_NETPROTO(PF_AX25); | |||
2014 | 2015 | ||
2015 | static void __exit ax25_exit(void) | 2016 | static void __exit ax25_exit(void) |
2016 | { | 2017 | { |
2017 | proc_net_remove("ax25_route"); | 2018 | proc_net_remove(&init_net, "ax25_route"); |
2018 | proc_net_remove("ax25"); | 2019 | proc_net_remove(&init_net, "ax25"); |
2019 | proc_net_remove("ax25_calls"); | 2020 | proc_net_remove(&init_net, "ax25_calls"); |
2020 | ax25_rt_free(); | 2021 | ax25_rt_free(); |
2021 | ax25_uid_free(); | 2022 | ax25_uid_free(); |
2022 | ax25_dev_free(); | 2023 | ax25_dev_free(); |
diff --git a/net/core/dev.c b/net/core/dev.c index 29cf00c5d865..618fb1c1dd47 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -92,6 +92,7 @@ | |||
92 | #include <linux/etherdevice.h> | 92 | #include <linux/etherdevice.h> |
93 | #include <linux/notifier.h> | 93 | #include <linux/notifier.h> |
94 | #include <linux/skbuff.h> | 94 | #include <linux/skbuff.h> |
95 | #include <net/net_namespace.h> | ||
95 | #include <net/sock.h> | 96 | #include <net/sock.h> |
96 | #include <linux/rtnetlink.h> | 97 | #include <linux/rtnetlink.h> |
97 | #include <linux/proc_fs.h> | 98 | #include <linux/proc_fs.h> |
@@ -2556,24 +2557,24 @@ static int __init dev_proc_init(void) | |||
2556 | { | 2557 | { |
2557 | int rc = -ENOMEM; | 2558 | int rc = -ENOMEM; |
2558 | 2559 | ||
2559 | if (!proc_net_fops_create("dev", S_IRUGO, &dev_seq_fops)) | 2560 | if (!proc_net_fops_create(&init_net, "dev", S_IRUGO, &dev_seq_fops)) |
2560 | goto out; | 2561 | goto out; |
2561 | if (!proc_net_fops_create("softnet_stat", S_IRUGO, &softnet_seq_fops)) | 2562 | if (!proc_net_fops_create(&init_net, "softnet_stat", S_IRUGO, &softnet_seq_fops)) |
2562 | goto out_dev; | 2563 | goto out_dev; |
2563 | if (!proc_net_fops_create("ptype", S_IRUGO, &ptype_seq_fops)) | 2564 | if (!proc_net_fops_create(&init_net, "ptype", S_IRUGO, &ptype_seq_fops)) |
2564 | goto out_dev2; | 2565 | goto out_softnet; |
2565 | 2566 | ||
2566 | if (wext_proc_init()) | 2567 | if (wext_proc_init()) |
2567 | goto out_softnet; | 2568 | goto out_ptype; |
2568 | rc = 0; | 2569 | rc = 0; |
2569 | out: | 2570 | out: |
2570 | return rc; | 2571 | return rc; |
2572 | out_ptype: | ||
2573 | proc_net_remove(&init_net, "ptype"); | ||
2571 | out_softnet: | 2574 | out_softnet: |
2572 | proc_net_remove("ptype"); | 2575 | proc_net_remove(&init_net, "softnet_stat"); |
2573 | out_dev2: | ||
2574 | proc_net_remove("softnet_stat"); | ||
2575 | out_dev: | 2576 | out_dev: |
2576 | proc_net_remove("dev"); | 2577 | proc_net_remove(&init_net, "dev"); |
2577 | goto out; | 2578 | goto out; |
2578 | } | 2579 | } |
2579 | #else | 2580 | #else |
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index 20330c572610..8e069fc207cb 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/proc_fs.h> | 41 | #include <linux/proc_fs.h> |
42 | #include <linux/seq_file.h> | 42 | #include <linux/seq_file.h> |
43 | #include <linux/init.h> | 43 | #include <linux/init.h> |
44 | #include <net/net_namespace.h> | ||
44 | #include <net/ip.h> | 45 | #include <net/ip.h> |
45 | #include <net/route.h> | 46 | #include <net/route.h> |
46 | #include <linux/skbuff.h> | 47 | #include <linux/skbuff.h> |
@@ -254,7 +255,7 @@ static const struct file_operations dev_mc_seq_fops = { | |||
254 | 255 | ||
255 | void __init dev_mcast_init(void) | 256 | void __init dev_mcast_init(void) |
256 | { | 257 | { |
257 | proc_net_fops_create("dev_mcast", 0, &dev_mc_seq_fops); | 258 | proc_net_fops_create(&init_net, "dev_mcast", 0, &dev_mc_seq_fops); |
258 | } | 259 | } |
259 | 260 | ||
260 | EXPORT_SYMBOL(dev_mc_add); | 261 | EXPORT_SYMBOL(dev_mc_add); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index ecd43c4a2221..5f25f4f79b8c 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/sysctl.h> | 25 | #include <linux/sysctl.h> |
26 | #endif | 26 | #endif |
27 | #include <linux/times.h> | 27 | #include <linux/times.h> |
28 | #include <net/net_namespace.h> | ||
28 | #include <net/neighbour.h> | 29 | #include <net/neighbour.h> |
29 | #include <net/dst.h> | 30 | #include <net/dst.h> |
30 | #include <net/sock.h> | 31 | #include <net/sock.h> |
@@ -1350,7 +1351,7 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl) | |||
1350 | panic("cannot create neighbour cache statistics"); | 1351 | panic("cannot create neighbour cache statistics"); |
1351 | 1352 | ||
1352 | #ifdef CONFIG_PROC_FS | 1353 | #ifdef CONFIG_PROC_FS |
1353 | tbl->pde = create_proc_entry(tbl->id, 0, proc_net_stat); | 1354 | tbl->pde = create_proc_entry(tbl->id, 0, init_net.proc_net_stat); |
1354 | if (!tbl->pde) | 1355 | if (!tbl->pde) |
1355 | panic("cannot create neighbour proc dir entry"); | 1356 | panic("cannot create neighbour proc dir entry"); |
1356 | tbl->pde->proc_fops = &neigh_stat_seq_fops; | 1357 | tbl->pde->proc_fops = &neigh_stat_seq_fops; |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 84c0edeedf6d..33d7247fb19d 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -152,6 +152,7 @@ | |||
152 | #include <linux/wait.h> | 152 | #include <linux/wait.h> |
153 | #include <linux/etherdevice.h> | 153 | #include <linux/etherdevice.h> |
154 | #include <linux/kthread.h> | 154 | #include <linux/kthread.h> |
155 | #include <net/net_namespace.h> | ||
155 | #include <net/checksum.h> | 156 | #include <net/checksum.h> |
156 | #include <net/ipv6.h> | 157 | #include <net/ipv6.h> |
157 | #include <net/addrconf.h> | 158 | #include <net/addrconf.h> |
@@ -3808,7 +3809,7 @@ static int __init pg_init(void) | |||
3808 | 3809 | ||
3809 | printk(KERN_INFO "%s", version); | 3810 | printk(KERN_INFO "%s", version); |
3810 | 3811 | ||
3811 | pg_proc_dir = proc_mkdir(PG_PROC_DIR, proc_net); | 3812 | pg_proc_dir = proc_mkdir(PG_PROC_DIR, init_net.proc_net); |
3812 | if (!pg_proc_dir) | 3813 | if (!pg_proc_dir) |
3813 | return -ENODEV; | 3814 | return -ENODEV; |
3814 | pg_proc_dir->owner = THIS_MODULE; | 3815 | pg_proc_dir->owner = THIS_MODULE; |
@@ -3817,7 +3818,7 @@ static int __init pg_init(void) | |||
3817 | if (pe == NULL) { | 3818 | if (pe == NULL) { |
3818 | printk(KERN_ERR "pktgen: ERROR: cannot create %s " | 3819 | printk(KERN_ERR "pktgen: ERROR: cannot create %s " |
3819 | "procfs entry.\n", PGCTRL); | 3820 | "procfs entry.\n", PGCTRL); |
3820 | proc_net_remove(PG_PROC_DIR); | 3821 | proc_net_remove(&init_net, PG_PROC_DIR); |
3821 | return -EINVAL; | 3822 | return -EINVAL; |
3822 | } | 3823 | } |
3823 | 3824 | ||
@@ -3841,7 +3842,7 @@ static int __init pg_init(void) | |||
3841 | "all threads\n"); | 3842 | "all threads\n"); |
3842 | unregister_netdevice_notifier(&pktgen_notifier_block); | 3843 | unregister_netdevice_notifier(&pktgen_notifier_block); |
3843 | remove_proc_entry(PGCTRL, pg_proc_dir); | 3844 | remove_proc_entry(PGCTRL, pg_proc_dir); |
3844 | proc_net_remove(PG_PROC_DIR); | 3845 | proc_net_remove(&init_net, PG_PROC_DIR); |
3845 | return -ENODEV; | 3846 | return -ENODEV; |
3846 | } | 3847 | } |
3847 | 3848 | ||
@@ -3868,7 +3869,7 @@ static void __exit pg_cleanup(void) | |||
3868 | 3869 | ||
3869 | /* Clean up proc file system */ | 3870 | /* Clean up proc file system */ |
3870 | remove_proc_entry(PGCTRL, pg_proc_dir); | 3871 | remove_proc_entry(PGCTRL, pg_proc_dir); |
3871 | proc_net_remove(PG_PROC_DIR); | 3872 | proc_net_remove(&init_net, PG_PROC_DIR); |
3872 | } | 3873 | } |
3873 | 3874 | ||
3874 | module_init(pg_init); | 3875 | module_init(pg_init); |
diff --git a/net/core/sock.c b/net/core/sock.c index beb924c248e8..bbc726a49d87 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -119,6 +119,7 @@ | |||
119 | #include <linux/netdevice.h> | 119 | #include <linux/netdevice.h> |
120 | #include <net/protocol.h> | 120 | #include <net/protocol.h> |
121 | #include <linux/skbuff.h> | 121 | #include <linux/skbuff.h> |
122 | #include <net/net_namespace.h> | ||
122 | #include <net/request_sock.h> | 123 | #include <net/request_sock.h> |
123 | #include <net/sock.h> | 124 | #include <net/sock.h> |
124 | #include <net/xfrm.h> | 125 | #include <net/xfrm.h> |
@@ -1973,7 +1974,7 @@ static const struct file_operations proto_seq_fops = { | |||
1973 | static int __init proto_init(void) | 1974 | static int __init proto_init(void) |
1974 | { | 1975 | { |
1975 | /* register /proc/net/protocols */ | 1976 | /* register /proc/net/protocols */ |
1976 | return proc_net_fops_create("protocols", S_IRUGO, &proto_seq_fops) == NULL ? -ENOBUFS : 0; | 1977 | return proc_net_fops_create(&init_net, "protocols", S_IRUGO, &proto_seq_fops) == NULL ? -ENOBUFS : 0; |
1977 | } | 1978 | } |
1978 | 1979 | ||
1979 | subsys_initcall(proto_init); | 1980 | subsys_initcall(proto_init); |
diff --git a/net/dccp/probe.c b/net/dccp/probe.c index bae10b0f2fc3..7053bb827bc8 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/kfifo.h> | 31 | #include <linux/kfifo.h> |
32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
33 | #include <net/net_namespace.h> | ||
33 | 34 | ||
34 | #include "dccp.h" | 35 | #include "dccp.h" |
35 | #include "ccid.h" | 36 | #include "ccid.h" |
@@ -168,7 +169,7 @@ static __init int dccpprobe_init(void) | |||
168 | if (IS_ERR(dccpw.fifo)) | 169 | if (IS_ERR(dccpw.fifo)) |
169 | return PTR_ERR(dccpw.fifo); | 170 | return PTR_ERR(dccpw.fifo); |
170 | 171 | ||
171 | if (!proc_net_fops_create(procname, S_IRUSR, &dccpprobe_fops)) | 172 | if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) |
172 | goto err0; | 173 | goto err0; |
173 | 174 | ||
174 | ret = register_jprobe(&dccp_send_probe); | 175 | ret = register_jprobe(&dccp_send_probe); |
@@ -178,7 +179,7 @@ static __init int dccpprobe_init(void) | |||
178 | pr_info("DCCP watch registered (port=%d)\n", port); | 179 | pr_info("DCCP watch registered (port=%d)\n", port); |
179 | return 0; | 180 | return 0; |
180 | err1: | 181 | err1: |
181 | proc_net_remove(procname); | 182 | proc_net_remove(&init_net, procname); |
182 | err0: | 183 | err0: |
183 | kfifo_free(dccpw.fifo); | 184 | kfifo_free(dccpw.fifo); |
184 | return ret; | 185 | return ret; |
@@ -188,7 +189,7 @@ module_init(dccpprobe_init); | |||
188 | static __exit void dccpprobe_exit(void) | 189 | static __exit void dccpprobe_exit(void) |
189 | { | 190 | { |
190 | kfifo_free(dccpw.fifo); | 191 | kfifo_free(dccpw.fifo); |
191 | proc_net_remove(procname); | 192 | proc_net_remove(&init_net, procname); |
192 | unregister_jprobe(&dccp_send_probe); | 193 | unregister_jprobe(&dccp_send_probe); |
193 | 194 | ||
194 | } | 195 | } |
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index ed76d4aab4a9..625d5955b8e2 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -128,6 +128,7 @@ Version 0.0.6 2.1.110 07-aug-98 Eduardo Marcelo Serrat | |||
128 | #include <linux/stat.h> | 128 | #include <linux/stat.h> |
129 | #include <linux/init.h> | 129 | #include <linux/init.h> |
130 | #include <linux/poll.h> | 130 | #include <linux/poll.h> |
131 | #include <net/net_namespace.h> | ||
131 | #include <net/neighbour.h> | 132 | #include <net/neighbour.h> |
132 | #include <net/dst.h> | 133 | #include <net/dst.h> |
133 | #include <net/fib_rules.h> | 134 | #include <net/fib_rules.h> |
@@ -2399,7 +2400,7 @@ static int __init decnet_init(void) | |||
2399 | dev_add_pack(&dn_dix_packet_type); | 2400 | dev_add_pack(&dn_dix_packet_type); |
2400 | register_netdevice_notifier(&dn_dev_notifier); | 2401 | register_netdevice_notifier(&dn_dev_notifier); |
2401 | 2402 | ||
2402 | proc_net_fops_create("decnet", S_IRUGO, &dn_socket_seq_fops); | 2403 | proc_net_fops_create(&init_net, "decnet", S_IRUGO, &dn_socket_seq_fops); |
2403 | dn_register_sysctl(); | 2404 | dn_register_sysctl(); |
2404 | out: | 2405 | out: |
2405 | return rc; | 2406 | return rc; |
@@ -2428,7 +2429,7 @@ static void __exit decnet_exit(void) | |||
2428 | dn_neigh_cleanup(); | 2429 | dn_neigh_cleanup(); |
2429 | dn_fib_cleanup(); | 2430 | dn_fib_cleanup(); |
2430 | 2431 | ||
2431 | proc_net_remove("decnet"); | 2432 | proc_net_remove(&init_net, "decnet"); |
2432 | 2433 | ||
2433 | proto_unregister(&dn_proto); | 2434 | proto_unregister(&dn_proto); |
2434 | } | 2435 | } |
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 8def68209edd..83cb0761336a 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/notifier.h> | 42 | #include <linux/notifier.h> |
43 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
44 | #include <asm/system.h> | 44 | #include <asm/system.h> |
45 | #include <net/net_namespace.h> | ||
45 | #include <net/neighbour.h> | 46 | #include <net/neighbour.h> |
46 | #include <net/dst.h> | 47 | #include <net/dst.h> |
47 | #include <net/flow.h> | 48 | #include <net/flow.h> |
@@ -1462,7 +1463,7 @@ void __init dn_dev_init(void) | |||
1462 | rtnl_register(PF_DECnet, RTM_DELADDR, dn_nl_deladdr, NULL); | 1463 | rtnl_register(PF_DECnet, RTM_DELADDR, dn_nl_deladdr, NULL); |
1463 | rtnl_register(PF_DECnet, RTM_GETADDR, NULL, dn_nl_dump_ifaddr); | 1464 | rtnl_register(PF_DECnet, RTM_GETADDR, NULL, dn_nl_dump_ifaddr); |
1464 | 1465 | ||
1465 | proc_net_fops_create("decnet_dev", S_IRUGO, &dn_dev_seq_fops); | 1466 | proc_net_fops_create(&init_net, "decnet_dev", S_IRUGO, &dn_dev_seq_fops); |
1466 | 1467 | ||
1467 | #ifdef CONFIG_SYSCTL | 1468 | #ifdef CONFIG_SYSCTL |
1468 | { | 1469 | { |
@@ -1483,7 +1484,7 @@ void __exit dn_dev_cleanup(void) | |||
1483 | } | 1484 | } |
1484 | #endif /* CONFIG_SYSCTL */ | 1485 | #endif /* CONFIG_SYSCTL */ |
1485 | 1486 | ||
1486 | proc_net_remove("decnet_dev"); | 1487 | proc_net_remove(&init_net, "decnet_dev"); |
1487 | 1488 | ||
1488 | dn_dev_devices_off(); | 1489 | dn_dev_devices_off(); |
1489 | } | 1490 | } |
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 174d8a7a6dac..a424a8ddbaf7 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/rcupdate.h> | 38 | #include <linux/rcupdate.h> |
39 | #include <linux/jhash.h> | 39 | #include <linux/jhash.h> |
40 | #include <asm/atomic.h> | 40 | #include <asm/atomic.h> |
41 | #include <net/net_namespace.h> | ||
41 | #include <net/neighbour.h> | 42 | #include <net/neighbour.h> |
42 | #include <net/dst.h> | 43 | #include <net/dst.h> |
43 | #include <net/flow.h> | 44 | #include <net/flow.h> |
@@ -611,11 +612,11 @@ static const struct file_operations dn_neigh_seq_fops = { | |||
611 | void __init dn_neigh_init(void) | 612 | void __init dn_neigh_init(void) |
612 | { | 613 | { |
613 | neigh_table_init(&dn_neigh_table); | 614 | neigh_table_init(&dn_neigh_table); |
614 | proc_net_fops_create("decnet_neigh", S_IRUGO, &dn_neigh_seq_fops); | 615 | proc_net_fops_create(&init_net, "decnet_neigh", S_IRUGO, &dn_neigh_seq_fops); |
615 | } | 616 | } |
616 | 617 | ||
617 | void __exit dn_neigh_cleanup(void) | 618 | void __exit dn_neigh_cleanup(void) |
618 | { | 619 | { |
619 | proc_net_remove("decnet_neigh"); | 620 | proc_net_remove(&init_net, "decnet_neigh"); |
620 | neigh_table_clear(&dn_neigh_table); | 621 | neigh_table_clear(&dn_neigh_table); |
621 | } | 622 | } |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index a4a620971ef0..4cfea9563d2a 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -77,6 +77,7 @@ | |||
77 | #include <linux/rcupdate.h> | 77 | #include <linux/rcupdate.h> |
78 | #include <linux/times.h> | 78 | #include <linux/times.h> |
79 | #include <asm/errno.h> | 79 | #include <asm/errno.h> |
80 | #include <net/net_namespace.h> | ||
80 | #include <net/netlink.h> | 81 | #include <net/netlink.h> |
81 | #include <net/neighbour.h> | 82 | #include <net/neighbour.h> |
82 | #include <net/dst.h> | 83 | #include <net/dst.h> |
@@ -1814,7 +1815,7 @@ void __init dn_route_init(void) | |||
1814 | 1815 | ||
1815 | dn_dst_ops.gc_thresh = (dn_rt_hash_mask + 1); | 1816 | dn_dst_ops.gc_thresh = (dn_rt_hash_mask + 1); |
1816 | 1817 | ||
1817 | proc_net_fops_create("decnet_cache", S_IRUGO, &dn_rt_cache_seq_fops); | 1818 | proc_net_fops_create(&init_net, "decnet_cache", S_IRUGO, &dn_rt_cache_seq_fops); |
1818 | 1819 | ||
1819 | #ifdef CONFIG_DECNET_ROUTER | 1820 | #ifdef CONFIG_DECNET_ROUTER |
1820 | rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute, dn_fib_dump); | 1821 | rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute, dn_fib_dump); |
@@ -1829,6 +1830,6 @@ void __exit dn_route_cleanup(void) | |||
1829 | del_timer(&dn_route_timer); | 1830 | del_timer(&dn_route_timer); |
1830 | dn_run_flush(0); | 1831 | dn_run_flush(0); |
1831 | 1832 | ||
1832 | proc_net_remove("decnet_cache"); | 1833 | proc_net_remove(&init_net, "decnet_cache"); |
1833 | } | 1834 | } |
1834 | 1835 | ||
diff --git a/net/ieee80211/ieee80211_module.c b/net/ieee80211/ieee80211_module.c index 17ad278696ed..69cb6aad25be 100644 --- a/net/ieee80211/ieee80211_module.c +++ b/net/ieee80211/ieee80211_module.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/wireless.h> | 47 | #include <linux/wireless.h> |
48 | #include <linux/etherdevice.h> | 48 | #include <linux/etherdevice.h> |
49 | #include <asm/uaccess.h> | 49 | #include <asm/uaccess.h> |
50 | #include <net/net_namespace.h> | ||
50 | #include <net/arp.h> | 51 | #include <net/arp.h> |
51 | 52 | ||
52 | #include <net/ieee80211.h> | 53 | #include <net/ieee80211.h> |
@@ -264,7 +265,7 @@ static int __init ieee80211_init(void) | |||
264 | struct proc_dir_entry *e; | 265 | struct proc_dir_entry *e; |
265 | 266 | ||
266 | ieee80211_debug_level = debug; | 267 | ieee80211_debug_level = debug; |
267 | ieee80211_proc = proc_mkdir(DRV_NAME, proc_net); | 268 | ieee80211_proc = proc_mkdir(DRV_NAME, init_net.proc_net); |
268 | if (ieee80211_proc == NULL) { | 269 | if (ieee80211_proc == NULL) { |
269 | IEEE80211_ERROR("Unable to create " DRV_NAME | 270 | IEEE80211_ERROR("Unable to create " DRV_NAME |
270 | " proc directory\n"); | 271 | " proc directory\n"); |
@@ -273,7 +274,7 @@ static int __init ieee80211_init(void) | |||
273 | e = create_proc_entry("debug_level", S_IFREG | S_IRUGO | S_IWUSR, | 274 | e = create_proc_entry("debug_level", S_IFREG | S_IRUGO | S_IWUSR, |
274 | ieee80211_proc); | 275 | ieee80211_proc); |
275 | if (!e) { | 276 | if (!e) { |
276 | remove_proc_entry(DRV_NAME, proc_net); | 277 | remove_proc_entry(DRV_NAME, init_net.proc_net); |
277 | ieee80211_proc = NULL; | 278 | ieee80211_proc = NULL; |
278 | return -EIO; | 279 | return -EIO; |
279 | } | 280 | } |
@@ -293,7 +294,7 @@ static void __exit ieee80211_exit(void) | |||
293 | #ifdef CONFIG_IEEE80211_DEBUG | 294 | #ifdef CONFIG_IEEE80211_DEBUG |
294 | if (ieee80211_proc) { | 295 | if (ieee80211_proc) { |
295 | remove_proc_entry("debug_level", ieee80211_proc); | 296 | remove_proc_entry("debug_level", ieee80211_proc); |
296 | remove_proc_entry(DRV_NAME, proc_net); | 297 | remove_proc_entry(DRV_NAME, init_net.proc_net); |
297 | ieee80211_proc = NULL; | 298 | ieee80211_proc = NULL; |
298 | } | 299 | } |
299 | #endif /* CONFIG_IEEE80211_DEBUG */ | 300 | #endif /* CONFIG_IEEE80211_DEBUG */ |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 9ab9d534fbac..78dd3443016c 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -103,6 +103,7 @@ | |||
103 | #include <linux/sysctl.h> | 103 | #include <linux/sysctl.h> |
104 | #endif | 104 | #endif |
105 | 105 | ||
106 | #include <net/net_namespace.h> | ||
106 | #include <net/ip.h> | 107 | #include <net/ip.h> |
107 | #include <net/icmp.h> | 108 | #include <net/icmp.h> |
108 | #include <net/route.h> | 109 | #include <net/route.h> |
@@ -1400,7 +1401,7 @@ static const struct file_operations arp_seq_fops = { | |||
1400 | 1401 | ||
1401 | static int __init arp_proc_init(void) | 1402 | static int __init arp_proc_init(void) |
1402 | { | 1403 | { |
1403 | if (!proc_net_fops_create("arp", S_IRUGO, &arp_seq_fops)) | 1404 | if (!proc_net_fops_create(&init_net, "arp", S_IRUGO, &arp_seq_fops)) |
1404 | return -ENOMEM; | 1405 | return -ENOMEM; |
1405 | return 0; | 1406 | return 0; |
1406 | } | 1407 | } |
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c index 9ad1d9ff9ce7..9fafbeea8fe6 100644 --- a/net/ipv4/fib_hash.c +++ b/net/ipv4/fib_hash.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/netlink.h> | 35 | #include <linux/netlink.h> |
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | 37 | ||
38 | #include <net/net_namespace.h> | ||
38 | #include <net/ip.h> | 39 | #include <net/ip.h> |
39 | #include <net/protocol.h> | 40 | #include <net/protocol.h> |
40 | #include <net/route.h> | 41 | #include <net/route.h> |
@@ -1068,13 +1069,13 @@ static const struct file_operations fib_seq_fops = { | |||
1068 | 1069 | ||
1069 | int __init fib_proc_init(void) | 1070 | int __init fib_proc_init(void) |
1070 | { | 1071 | { |
1071 | if (!proc_net_fops_create("route", S_IRUGO, &fib_seq_fops)) | 1072 | if (!proc_net_fops_create(&init_net, "route", S_IRUGO, &fib_seq_fops)) |
1072 | return -ENOMEM; | 1073 | return -ENOMEM; |
1073 | return 0; | 1074 | return 0; |
1074 | } | 1075 | } |
1075 | 1076 | ||
1076 | void __init fib_proc_exit(void) | 1077 | void __init fib_proc_exit(void) |
1077 | { | 1078 | { |
1078 | proc_net_remove("route"); | 1079 | proc_net_remove(&init_net, "route"); |
1079 | } | 1080 | } |
1080 | #endif /* CONFIG_PROC_FS */ | 1081 | #endif /* CONFIG_PROC_FS */ |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 52b2891c63b7..be34bd556d58 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -73,6 +73,7 @@ | |||
73 | #include <linux/netlink.h> | 73 | #include <linux/netlink.h> |
74 | #include <linux/init.h> | 74 | #include <linux/init.h> |
75 | #include <linux/list.h> | 75 | #include <linux/list.h> |
76 | #include <net/net_namespace.h> | ||
76 | #include <net/ip.h> | 77 | #include <net/ip.h> |
77 | #include <net/protocol.h> | 78 | #include <net/protocol.h> |
78 | #include <net/route.h> | 79 | #include <net/route.h> |
@@ -2530,30 +2531,30 @@ static const struct file_operations fib_route_fops = { | |||
2530 | 2531 | ||
2531 | int __init fib_proc_init(void) | 2532 | int __init fib_proc_init(void) |
2532 | { | 2533 | { |
2533 | if (!proc_net_fops_create("fib_trie", S_IRUGO, &fib_trie_fops)) | 2534 | if (!proc_net_fops_create(&init_net, "fib_trie", S_IRUGO, &fib_trie_fops)) |
2534 | goto out1; | 2535 | goto out1; |
2535 | 2536 | ||
2536 | if (!proc_net_fops_create("fib_triestat", S_IRUGO, &fib_triestat_fops)) | 2537 | if (!proc_net_fops_create(&init_net, "fib_triestat", S_IRUGO, &fib_triestat_fops)) |
2537 | goto out2; | 2538 | goto out2; |
2538 | 2539 | ||
2539 | if (!proc_net_fops_create("route", S_IRUGO, &fib_route_fops)) | 2540 | if (!proc_net_fops_create(&init_net, "route", S_IRUGO, &fib_route_fops)) |
2540 | goto out3; | 2541 | goto out3; |
2541 | 2542 | ||
2542 | return 0; | 2543 | return 0; |
2543 | 2544 | ||
2544 | out3: | 2545 | out3: |
2545 | proc_net_remove("fib_triestat"); | 2546 | proc_net_remove(&init_net, "fib_triestat"); |
2546 | out2: | 2547 | out2: |
2547 | proc_net_remove("fib_trie"); | 2548 | proc_net_remove(&init_net, "fib_trie"); |
2548 | out1: | 2549 | out1: |
2549 | return -ENOMEM; | 2550 | return -ENOMEM; |
2550 | } | 2551 | } |
2551 | 2552 | ||
2552 | void __init fib_proc_exit(void) | 2553 | void __init fib_proc_exit(void) |
2553 | { | 2554 | { |
2554 | proc_net_remove("fib_trie"); | 2555 | proc_net_remove(&init_net, "fib_trie"); |
2555 | proc_net_remove("fib_triestat"); | 2556 | proc_net_remove(&init_net, "fib_triestat"); |
2556 | proc_net_remove("route"); | 2557 | proc_net_remove(&init_net, "route"); |
2557 | } | 2558 | } |
2558 | 2559 | ||
2559 | #endif /* CONFIG_PROC_FS */ | 2560 | #endif /* CONFIG_PROC_FS */ |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index a646409c2d06..d78599a9dbd5 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -91,6 +91,7 @@ | |||
91 | #include <linux/rtnetlink.h> | 91 | #include <linux/rtnetlink.h> |
92 | #include <linux/times.h> | 92 | #include <linux/times.h> |
93 | 93 | ||
94 | #include <net/net_namespace.h> | ||
94 | #include <net/arp.h> | 95 | #include <net/arp.h> |
95 | #include <net/ip.h> | 96 | #include <net/ip.h> |
96 | #include <net/protocol.h> | 97 | #include <net/protocol.h> |
@@ -2613,8 +2614,8 @@ static const struct file_operations igmp_mcf_seq_fops = { | |||
2613 | 2614 | ||
2614 | int __init igmp_mc_proc_init(void) | 2615 | int __init igmp_mc_proc_init(void) |
2615 | { | 2616 | { |
2616 | proc_net_fops_create("igmp", S_IRUGO, &igmp_mc_seq_fops); | 2617 | proc_net_fops_create(&init_net, "igmp", S_IRUGO, &igmp_mc_seq_fops); |
2617 | proc_net_fops_create("mcfilter", S_IRUGO, &igmp_mcf_seq_fops); | 2618 | proc_net_fops_create(&init_net, "mcfilter", S_IRUGO, &igmp_mcf_seq_fops); |
2618 | return 0; | 2619 | return 0; |
2619 | } | 2620 | } |
2620 | #endif | 2621 | #endif |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index c5b247077539..5ae4849878a3 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <linux/root_dev.h> | 55 | #include <linux/root_dev.h> |
56 | #include <linux/delay.h> | 56 | #include <linux/delay.h> |
57 | #include <linux/nfs_fs.h> | 57 | #include <linux/nfs_fs.h> |
58 | #include <net/net_namespace.h> | ||
58 | #include <net/arp.h> | 59 | #include <net/arp.h> |
59 | #include <net/ip.h> | 60 | #include <net/ip.h> |
60 | #include <net/ipconfig.h> | 61 | #include <net/ipconfig.h> |
@@ -1253,7 +1254,7 @@ static int __init ip_auto_config(void) | |||
1253 | __be32 addr; | 1254 | __be32 addr; |
1254 | 1255 | ||
1255 | #ifdef CONFIG_PROC_FS | 1256 | #ifdef CONFIG_PROC_FS |
1256 | proc_net_fops_create("pnp", S_IRUGO, &pnp_seq_fops); | 1257 | proc_net_fops_create(&init_net, "pnp", S_IRUGO, &pnp_seq_fops); |
1257 | #endif /* CONFIG_PROC_FS */ | 1258 | #endif /* CONFIG_PROC_FS */ |
1258 | 1259 | ||
1259 | if (!ic_enable) | 1260 | if (!ic_enable) |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 7003cc1b7fe2..35683e1a42e8 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/mroute.h> | 49 | #include <linux/mroute.h> |
50 | #include <linux/init.h> | 50 | #include <linux/init.h> |
51 | #include <linux/if_ether.h> | 51 | #include <linux/if_ether.h> |
52 | #include <net/net_namespace.h> | ||
52 | #include <net/ip.h> | 53 | #include <net/ip.h> |
53 | #include <net/protocol.h> | 54 | #include <net/protocol.h> |
54 | #include <linux/skbuff.h> | 55 | #include <linux/skbuff.h> |
@@ -1922,7 +1923,7 @@ void __init ip_mr_init(void) | |||
1922 | ipmr_expire_timer.function=ipmr_expire_process; | 1923 | ipmr_expire_timer.function=ipmr_expire_process; |
1923 | register_netdevice_notifier(&ip_mr_notifier); | 1924 | register_netdevice_notifier(&ip_mr_notifier); |
1924 | #ifdef CONFIG_PROC_FS | 1925 | #ifdef CONFIG_PROC_FS |
1925 | proc_net_fops_create("ip_mr_vif", 0, &ipmr_vif_fops); | 1926 | proc_net_fops_create(&init_net, "ip_mr_vif", 0, &ipmr_vif_fops); |
1926 | proc_net_fops_create("ip_mr_cache", 0, &ipmr_mfc_fops); | 1927 | proc_net_fops_create(&init_net, "ip_mr_cache", 0, &ipmr_mfc_fops); |
1927 | #endif | 1928 | #endif |
1928 | } | 1929 | } |
diff --git a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c index 8d6901d4e94f..341474eefa55 100644 --- a/net/ipv4/ipvs/ip_vs_app.c +++ b/net/ipv4/ipvs/ip_vs_app.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/skbuff.h> | 25 | #include <linux/skbuff.h> |
26 | #include <linux/in.h> | 26 | #include <linux/in.h> |
27 | #include <linux/ip.h> | 27 | #include <linux/ip.h> |
28 | #include <net/net_namespace.h> | ||
28 | #include <net/protocol.h> | 29 | #include <net/protocol.h> |
29 | #include <net/tcp.h> | 30 | #include <net/tcp.h> |
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
@@ -616,12 +617,12 @@ int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri, | |||
616 | int ip_vs_app_init(void) | 617 | int ip_vs_app_init(void) |
617 | { | 618 | { |
618 | /* we will replace it with proc_net_ipvs_create() soon */ | 619 | /* we will replace it with proc_net_ipvs_create() soon */ |
619 | proc_net_fops_create("ip_vs_app", 0, &ip_vs_app_fops); | 620 | proc_net_fops_create(&init_net, "ip_vs_app", 0, &ip_vs_app_fops); |
620 | return 0; | 621 | return 0; |
621 | } | 622 | } |
622 | 623 | ||
623 | 624 | ||
624 | void ip_vs_app_cleanup(void) | 625 | void ip_vs_app_cleanup(void) |
625 | { | 626 | { |
626 | proc_net_remove("ip_vs_app"); | 627 | proc_net_remove(&init_net, "ip_vs_app"); |
627 | } | 628 | } |
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c index d612a6a5d957..4b702f708d30 100644 --- a/net/ipv4/ipvs/ip_vs_conn.c +++ b/net/ipv4/ipvs/ip_vs_conn.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/jhash.h> | 35 | #include <linux/jhash.h> |
36 | #include <linux/random.h> | 36 | #include <linux/random.h> |
37 | 37 | ||
38 | #include <net/net_namespace.h> | ||
38 | #include <net/ip_vs.h> | 39 | #include <net/ip_vs.h> |
39 | 40 | ||
40 | 41 | ||
@@ -922,7 +923,7 @@ int ip_vs_conn_init(void) | |||
922 | rwlock_init(&__ip_vs_conntbl_lock_array[idx].l); | 923 | rwlock_init(&__ip_vs_conntbl_lock_array[idx].l); |
923 | } | 924 | } |
924 | 925 | ||
925 | proc_net_fops_create("ip_vs_conn", 0, &ip_vs_conn_fops); | 926 | proc_net_fops_create(&init_net, "ip_vs_conn", 0, &ip_vs_conn_fops); |
926 | 927 | ||
927 | /* calculate the random value for connection hash */ | 928 | /* calculate the random value for connection hash */ |
928 | get_random_bytes(&ip_vs_conn_rnd, sizeof(ip_vs_conn_rnd)); | 929 | get_random_bytes(&ip_vs_conn_rnd, sizeof(ip_vs_conn_rnd)); |
@@ -938,6 +939,6 @@ void ip_vs_conn_cleanup(void) | |||
938 | 939 | ||
939 | /* Release the empty cache */ | 940 | /* Release the empty cache */ |
940 | kmem_cache_destroy(ip_vs_conn_cachep); | 941 | kmem_cache_destroy(ip_vs_conn_cachep); |
941 | proc_net_remove("ip_vs_conn"); | 942 | proc_net_remove(&init_net, "ip_vs_conn"); |
942 | vfree(ip_vs_conn_tab); | 943 | vfree(ip_vs_conn_tab); |
943 | } | 944 | } |
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index f656d41d8d41..61d023d58b5d 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/netfilter_ipv4.h> | 35 | #include <linux/netfilter_ipv4.h> |
36 | #include <linux/mutex.h> | 36 | #include <linux/mutex.h> |
37 | 37 | ||
38 | #include <net/net_namespace.h> | ||
38 | #include <net/ip.h> | 39 | #include <net/ip.h> |
39 | #include <net/route.h> | 40 | #include <net/route.h> |
40 | #include <net/sock.h> | 41 | #include <net/sock.h> |
@@ -2356,8 +2357,8 @@ int ip_vs_control_init(void) | |||
2356 | return ret; | 2357 | return ret; |
2357 | } | 2358 | } |
2358 | 2359 | ||
2359 | proc_net_fops_create("ip_vs", 0, &ip_vs_info_fops); | 2360 | proc_net_fops_create(&init_net, "ip_vs", 0, &ip_vs_info_fops); |
2360 | proc_net_fops_create("ip_vs_stats",0, &ip_vs_stats_fops); | 2361 | proc_net_fops_create(&init_net, "ip_vs_stats",0, &ip_vs_stats_fops); |
2361 | 2362 | ||
2362 | sysctl_header = register_sysctl_table(vs_root_table); | 2363 | sysctl_header = register_sysctl_table(vs_root_table); |
2363 | 2364 | ||
@@ -2390,8 +2391,8 @@ void ip_vs_control_cleanup(void) | |||
2390 | cancel_work_sync(&defense_work.work); | 2391 | cancel_work_sync(&defense_work.work); |
2391 | ip_vs_kill_estimator(&ip_vs_stats); | 2392 | ip_vs_kill_estimator(&ip_vs_stats); |
2392 | unregister_sysctl_table(sysctl_header); | 2393 | unregister_sysctl_table(sysctl_header); |
2393 | proc_net_remove("ip_vs_stats"); | 2394 | proc_net_remove(&init_net, "ip_vs_stats"); |
2394 | proc_net_remove("ip_vs"); | 2395 | proc_net_remove(&init_net, "ip_vs"); |
2395 | nf_unregister_sockopt(&ip_vs_sockopts); | 2396 | nf_unregister_sockopt(&ip_vs_sockopts); |
2396 | LeaveFunction(2); | 2397 | LeaveFunction(2); |
2397 | } | 2398 | } |
diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c index 6225acac7a3b..6a1fec416eaf 100644 --- a/net/ipv4/ipvs/ip_vs_lblcr.c +++ b/net/ipv4/ipvs/ip_vs_lblcr.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/sysctl.h> | 50 | #include <linux/sysctl.h> |
51 | /* for proc_net_create/proc_net_remove */ | 51 | /* for proc_net_create/proc_net_remove */ |
52 | #include <linux/proc_fs.h> | 52 | #include <linux/proc_fs.h> |
53 | #include <net/net_namespace.h> | ||
53 | 54 | ||
54 | #include <net/ip_vs.h> | 55 | #include <net/ip_vs.h> |
55 | 56 | ||
@@ -843,7 +844,7 @@ static int __init ip_vs_lblcr_init(void) | |||
843 | INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list); | 844 | INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list); |
844 | sysctl_header = register_sysctl_table(lblcr_root_table); | 845 | sysctl_header = register_sysctl_table(lblcr_root_table); |
845 | #ifdef CONFIG_IP_VS_LBLCR_DEBUG | 846 | #ifdef CONFIG_IP_VS_LBLCR_DEBUG |
846 | proc_net_create("ip_vs_lblcr", 0, ip_vs_lblcr_getinfo); | 847 | proc_net_create(&init_net, "ip_vs_lblcr", 0, ip_vs_lblcr_getinfo); |
847 | #endif | 848 | #endif |
848 | return register_ip_vs_scheduler(&ip_vs_lblcr_scheduler); | 849 | return register_ip_vs_scheduler(&ip_vs_lblcr_scheduler); |
849 | } | 850 | } |
@@ -852,7 +853,7 @@ static int __init ip_vs_lblcr_init(void) | |||
852 | static void __exit ip_vs_lblcr_cleanup(void) | 853 | static void __exit ip_vs_lblcr_cleanup(void) |
853 | { | 854 | { |
854 | #ifdef CONFIG_IP_VS_LBLCR_DEBUG | 855 | #ifdef CONFIG_IP_VS_LBLCR_DEBUG |
855 | proc_net_remove("ip_vs_lblcr"); | 856 | proc_net_remove(&init_net, "ip_vs_lblcr"); |
856 | #endif | 857 | #endif |
857 | unregister_sysctl_table(sysctl_header); | 858 | unregister_sysctl_table(sysctl_header); |
858 | unregister_ip_vs_scheduler(&ip_vs_lblcr_scheduler); | 859 | unregister_ip_vs_scheduler(&ip_vs_lblcr_scheduler); |
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 702d94db19b9..cb5e61a1d7ab 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
25 | #include <linux/security.h> | 25 | #include <linux/security.h> |
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | #include <net/net_namespace.h> | ||
27 | #include <net/sock.h> | 28 | #include <net/sock.h> |
28 | #include <net/route.h> | 29 | #include <net/route.h> |
29 | 30 | ||
@@ -674,7 +675,7 @@ static int __init ip_queue_init(void) | |||
674 | goto cleanup_netlink_notifier; | 675 | goto cleanup_netlink_notifier; |
675 | } | 676 | } |
676 | 677 | ||
677 | proc = proc_net_create(IPQ_PROC_FS_NAME, 0, ipq_get_info); | 678 | proc = proc_net_create(&init_net, IPQ_PROC_FS_NAME, 0, ipq_get_info); |
678 | if (proc) | 679 | if (proc) |
679 | proc->owner = THIS_MODULE; | 680 | proc->owner = THIS_MODULE; |
680 | else { | 681 | else { |
@@ -695,8 +696,7 @@ static int __init ip_queue_init(void) | |||
695 | cleanup_sysctl: | 696 | cleanup_sysctl: |
696 | unregister_sysctl_table(ipq_sysctl_header); | 697 | unregister_sysctl_table(ipq_sysctl_header); |
697 | unregister_netdevice_notifier(&ipq_dev_notifier); | 698 | unregister_netdevice_notifier(&ipq_dev_notifier); |
698 | proc_net_remove(IPQ_PROC_FS_NAME); | 699 | proc_net_remove(&init_net, IPQ_PROC_FS_NAME); |
699 | |||
700 | cleanup_ipqnl: | 700 | cleanup_ipqnl: |
701 | sock_release(ipqnl->sk_socket); | 701 | sock_release(ipqnl->sk_socket); |
702 | mutex_lock(&ipqnl_mutex); | 702 | mutex_lock(&ipqnl_mutex); |
@@ -715,7 +715,7 @@ static void __exit ip_queue_fini(void) | |||
715 | 715 | ||
716 | unregister_sysctl_table(ipq_sysctl_header); | 716 | unregister_sysctl_table(ipq_sysctl_header); |
717 | unregister_netdevice_notifier(&ipq_dev_notifier); | 717 | unregister_netdevice_notifier(&ipq_dev_notifier); |
718 | proc_net_remove(IPQ_PROC_FS_NAME); | 718 | proc_net_remove(&init_net, IPQ_PROC_FS_NAME); |
719 | 719 | ||
720 | sock_release(ipqnl->sk_socket); | 720 | sock_release(ipqnl->sk_socket); |
721 | mutex_lock(&ipqnl_mutex); | 721 | mutex_lock(&ipqnl_mutex); |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 69bd362b5fa2..50fc9e009fe4 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/netfilter_ipv4/ip_tables.h> | 25 | #include <linux/netfilter_ipv4/ip_tables.h> |
26 | #include <linux/netfilter_ipv4/ipt_CLUSTERIP.h> | 26 | #include <linux/netfilter_ipv4/ipt_CLUSTERIP.h> |
27 | #include <net/netfilter/nf_conntrack.h> | 27 | #include <net/netfilter/nf_conntrack.h> |
28 | #include <net/net_namespace.h> | ||
28 | #include <net/checksum.h> | 29 | #include <net/checksum.h> |
29 | 30 | ||
30 | #define CLUSTERIP_VERSION "0.8" | 31 | #define CLUSTERIP_VERSION "0.8" |
@@ -726,7 +727,7 @@ static int __init ipt_clusterip_init(void) | |||
726 | goto cleanup_target; | 727 | goto cleanup_target; |
727 | 728 | ||
728 | #ifdef CONFIG_PROC_FS | 729 | #ifdef CONFIG_PROC_FS |
729 | clusterip_procdir = proc_mkdir("ipt_CLUSTERIP", proc_net); | 730 | clusterip_procdir = proc_mkdir("ipt_CLUSTERIP", init_net.proc_net); |
730 | if (!clusterip_procdir) { | 731 | if (!clusterip_procdir) { |
731 | printk(KERN_ERR "CLUSTERIP: Unable to proc dir entry\n"); | 732 | printk(KERN_ERR "CLUSTERIP: Unable to proc dir entry\n"); |
732 | ret = -ENOMEM; | 733 | ret = -ENOMEM; |
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c index 6d0c0f7364ad..db2a79889f9a 100644 --- a/net/ipv4/netfilter/ipt_recent.c +++ b/net/ipv4/netfilter/ipt_recent.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/bitops.h> | 24 | #include <linux/bitops.h> |
25 | #include <linux/skbuff.h> | 25 | #include <linux/skbuff.h> |
26 | #include <linux/inet.h> | 26 | #include <linux/inet.h> |
27 | #include <net/net_namespace.h> | ||
27 | 28 | ||
28 | #include <linux/netfilter/x_tables.h> | 29 | #include <linux/netfilter/x_tables.h> |
29 | #include <linux/netfilter_ipv4/ipt_recent.h> | 30 | #include <linux/netfilter_ipv4/ipt_recent.h> |
@@ -487,7 +488,7 @@ static int __init ipt_recent_init(void) | |||
487 | #ifdef CONFIG_PROC_FS | 488 | #ifdef CONFIG_PROC_FS |
488 | if (err) | 489 | if (err) |
489 | return err; | 490 | return err; |
490 | proc_dir = proc_mkdir("ipt_recent", proc_net); | 491 | proc_dir = proc_mkdir("ipt_recent", init_net.proc_net); |
491 | if (proc_dir == NULL) { | 492 | if (proc_dir == NULL) { |
492 | xt_unregister_match(&recent_match); | 493 | xt_unregister_match(&recent_match); |
493 | err = -ENOMEM; | 494 | err = -ENOMEM; |
@@ -501,7 +502,7 @@ static void __exit ipt_recent_exit(void) | |||
501 | BUG_ON(!list_empty(&tables)); | 502 | BUG_ON(!list_empty(&tables)); |
502 | xt_unregister_match(&recent_match); | 503 | xt_unregister_match(&recent_match); |
503 | #ifdef CONFIG_PROC_FS | 504 | #ifdef CONFIG_PROC_FS |
504 | remove_proc_entry("ipt_recent", proc_net); | 505 | remove_proc_entry("ipt_recent", init_net.proc_net); |
505 | #endif | 506 | #endif |
506 | } | 507 | } |
507 | 508 | ||
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c index b3dd5de9a258..a5ae2eabf0f3 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/proc_fs.h> | 11 | #include <linux/proc_fs.h> |
12 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
13 | #include <linux/percpu.h> | 13 | #include <linux/percpu.h> |
14 | #include <net/net_namespace.h> | ||
14 | 15 | ||
15 | #include <linux/netfilter.h> | 16 | #include <linux/netfilter.h> |
16 | #include <net/netfilter/nf_conntrack_core.h> | 17 | #include <net/netfilter/nf_conntrack_core.h> |
@@ -408,16 +409,16 @@ int __init nf_conntrack_ipv4_compat_init(void) | |||
408 | { | 409 | { |
409 | struct proc_dir_entry *proc, *proc_exp, *proc_stat; | 410 | struct proc_dir_entry *proc, *proc_exp, *proc_stat; |
410 | 411 | ||
411 | proc = proc_net_fops_create("ip_conntrack", 0440, &ct_file_ops); | 412 | proc = proc_net_fops_create(&init_net, "ip_conntrack", 0440, &ct_file_ops); |
412 | if (!proc) | 413 | if (!proc) |
413 | goto err1; | 414 | goto err1; |
414 | 415 | ||
415 | proc_exp = proc_net_fops_create("ip_conntrack_expect", 0440, | 416 | proc_exp = proc_net_fops_create(&init_net, "ip_conntrack_expect", 0440, |
416 | &ip_exp_file_ops); | 417 | &ip_exp_file_ops); |
417 | if (!proc_exp) | 418 | if (!proc_exp) |
418 | goto err2; | 419 | goto err2; |
419 | 420 | ||
420 | proc_stat = create_proc_entry("ip_conntrack", S_IRUGO, proc_net_stat); | 421 | proc_stat = create_proc_entry("ip_conntrack", S_IRUGO, init_net.proc_net_stat); |
421 | if (!proc_stat) | 422 | if (!proc_stat) |
422 | goto err3; | 423 | goto err3; |
423 | 424 | ||
@@ -427,16 +428,16 @@ int __init nf_conntrack_ipv4_compat_init(void) | |||
427 | return 0; | 428 | return 0; |
428 | 429 | ||
429 | err3: | 430 | err3: |
430 | proc_net_remove("ip_conntrack_expect"); | 431 | proc_net_remove(&init_net, "ip_conntrack_expect"); |
431 | err2: | 432 | err2: |
432 | proc_net_remove("ip_conntrack"); | 433 | proc_net_remove(&init_net, "ip_conntrack"); |
433 | err1: | 434 | err1: |
434 | return -ENOMEM; | 435 | return -ENOMEM; |
435 | } | 436 | } |
436 | 437 | ||
437 | void __exit nf_conntrack_ipv4_compat_fini(void) | 438 | void __exit nf_conntrack_ipv4_compat_fini(void) |
438 | { | 439 | { |
439 | remove_proc_entry("ip_conntrack", proc_net_stat); | 440 | remove_proc_entry("ip_conntrack", init_net.proc_net_stat); |
440 | proc_net_remove("ip_conntrack_expect"); | 441 | proc_net_remove(&init_net, "ip_conntrack_expect"); |
441 | proc_net_remove("ip_conntrack"); | 442 | proc_net_remove(&init_net, "ip_conntrack"); |
442 | } | 443 | } |
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 986d1c83a000..95a8f8f2de71 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -34,6 +34,7 @@ | |||
34 | * 2 of the License, or (at your option) any later version. | 34 | * 2 of the License, or (at your option) any later version. |
35 | */ | 35 | */ |
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <net/net_namespace.h> | ||
37 | #include <net/icmp.h> | 38 | #include <net/icmp.h> |
38 | #include <net/protocol.h> | 39 | #include <net/protocol.h> |
39 | #include <net/tcp.h> | 40 | #include <net/tcp.h> |
@@ -383,20 +384,20 @@ int __init ip_misc_proc_init(void) | |||
383 | { | 384 | { |
384 | int rc = 0; | 385 | int rc = 0; |
385 | 386 | ||
386 | if (!proc_net_fops_create("netstat", S_IRUGO, &netstat_seq_fops)) | 387 | if (!proc_net_fops_create(&init_net, "netstat", S_IRUGO, &netstat_seq_fops)) |
387 | goto out_netstat; | 388 | goto out_netstat; |
388 | 389 | ||
389 | if (!proc_net_fops_create("snmp", S_IRUGO, &snmp_seq_fops)) | 390 | if (!proc_net_fops_create(&init_net, "snmp", S_IRUGO, &snmp_seq_fops)) |
390 | goto out_snmp; | 391 | goto out_snmp; |
391 | 392 | ||
392 | if (!proc_net_fops_create("sockstat", S_IRUGO, &sockstat_seq_fops)) | 393 | if (!proc_net_fops_create(&init_net, "sockstat", S_IRUGO, &sockstat_seq_fops)) |
393 | goto out_sockstat; | 394 | goto out_sockstat; |
394 | out: | 395 | out: |
395 | return rc; | 396 | return rc; |
396 | out_sockstat: | 397 | out_sockstat: |
397 | proc_net_remove("snmp"); | 398 | proc_net_remove(&init_net, "snmp"); |
398 | out_snmp: | 399 | out_snmp: |
399 | proc_net_remove("netstat"); | 400 | proc_net_remove(&init_net, "netstat"); |
400 | out_netstat: | 401 | out_netstat: |
401 | rc = -ENOMEM; | 402 | rc = -ENOMEM; |
402 | goto out; | 403 | goto out; |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index c6d71526f625..216e01b0f44a 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <linux/in_route.h> | 59 | #include <linux/in_route.h> |
60 | #include <linux/route.h> | 60 | #include <linux/route.h> |
61 | #include <linux/skbuff.h> | 61 | #include <linux/skbuff.h> |
62 | #include <net/net_namespace.h> | ||
62 | #include <net/dst.h> | 63 | #include <net/dst.h> |
63 | #include <net/sock.h> | 64 | #include <net/sock.h> |
64 | #include <linux/gfp.h> | 65 | #include <linux/gfp.h> |
@@ -928,13 +929,13 @@ static const struct file_operations raw_seq_fops = { | |||
928 | 929 | ||
929 | int __init raw_proc_init(void) | 930 | int __init raw_proc_init(void) |
930 | { | 931 | { |
931 | if (!proc_net_fops_create("raw", S_IRUGO, &raw_seq_fops)) | 932 | if (!proc_net_fops_create(&init_net, "raw", S_IRUGO, &raw_seq_fops)) |
932 | return -ENOMEM; | 933 | return -ENOMEM; |
933 | return 0; | 934 | return 0; |
934 | } | 935 | } |
935 | 936 | ||
936 | void __init raw_proc_exit(void) | 937 | void __init raw_proc_exit(void) |
937 | { | 938 | { |
938 | proc_net_remove("raw"); | 939 | proc_net_remove(&init_net, "raw"); |
939 | } | 940 | } |
940 | #endif /* CONFIG_PROC_FS */ | 941 | #endif /* CONFIG_PROC_FS */ |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index c7ca94bd152c..efd2a9202d68 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -91,6 +91,7 @@ | |||
91 | #include <linux/jhash.h> | 91 | #include <linux/jhash.h> |
92 | #include <linux/rcupdate.h> | 92 | #include <linux/rcupdate.h> |
93 | #include <linux/times.h> | 93 | #include <linux/times.h> |
94 | #include <net/net_namespace.h> | ||
94 | #include <net/protocol.h> | 95 | #include <net/protocol.h> |
95 | #include <net/ip.h> | 96 | #include <net/ip.h> |
96 | #include <net/route.h> | 97 | #include <net/route.h> |
@@ -3011,15 +3012,15 @@ int __init ip_rt_init(void) | |||
3011 | #ifdef CONFIG_PROC_FS | 3012 | #ifdef CONFIG_PROC_FS |
3012 | { | 3013 | { |
3013 | struct proc_dir_entry *rtstat_pde = NULL; /* keep gcc happy */ | 3014 | struct proc_dir_entry *rtstat_pde = NULL; /* keep gcc happy */ |
3014 | if (!proc_net_fops_create("rt_cache", S_IRUGO, &rt_cache_seq_fops) || | 3015 | if (!proc_net_fops_create(&init_net, "rt_cache", S_IRUGO, &rt_cache_seq_fops) || |
3015 | !(rtstat_pde = create_proc_entry("rt_cache", S_IRUGO, | 3016 | !(rtstat_pde = create_proc_entry("rt_cache", S_IRUGO, |
3016 | proc_net_stat))) { | 3017 | init_net.proc_net_stat))) { |
3017 | return -ENOMEM; | 3018 | return -ENOMEM; |
3018 | } | 3019 | } |
3019 | rtstat_pde->proc_fops = &rt_cpu_seq_fops; | 3020 | rtstat_pde->proc_fops = &rt_cpu_seq_fops; |
3020 | } | 3021 | } |
3021 | #ifdef CONFIG_NET_CLS_ROUTE | 3022 | #ifdef CONFIG_NET_CLS_ROUTE |
3022 | create_proc_read_entry("rt_acct", 0, proc_net, ip_rt_acct_read, NULL); | 3023 | create_proc_read_entry("rt_acct", 0, init_net.proc_net, ip_rt_acct_read, NULL); |
3023 | #endif | 3024 | #endif |
3024 | #endif | 3025 | #endif |
3025 | #ifdef CONFIG_XFRM | 3026 | #ifdef CONFIG_XFRM |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index e089a978e128..8855e640e958 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <linux/init.h> | 62 | #include <linux/init.h> |
63 | #include <linux/times.h> | 63 | #include <linux/times.h> |
64 | 64 | ||
65 | #include <net/net_namespace.h> | ||
65 | #include <net/icmp.h> | 66 | #include <net/icmp.h> |
66 | #include <net/inet_hashtables.h> | 67 | #include <net/inet_hashtables.h> |
67 | #include <net/tcp.h> | 68 | #include <net/tcp.h> |
@@ -2249,7 +2250,7 @@ int tcp_proc_register(struct tcp_seq_afinfo *afinfo) | |||
2249 | afinfo->seq_fops->llseek = seq_lseek; | 2250 | afinfo->seq_fops->llseek = seq_lseek; |
2250 | afinfo->seq_fops->release = seq_release_private; | 2251 | afinfo->seq_fops->release = seq_release_private; |
2251 | 2252 | ||
2252 | p = proc_net_fops_create(afinfo->name, S_IRUGO, afinfo->seq_fops); | 2253 | p = proc_net_fops_create(&init_net, afinfo->name, S_IRUGO, afinfo->seq_fops); |
2253 | if (p) | 2254 | if (p) |
2254 | p->data = afinfo; | 2255 | p->data = afinfo; |
2255 | else | 2256 | else |
@@ -2261,7 +2262,7 @@ void tcp_proc_unregister(struct tcp_seq_afinfo *afinfo) | |||
2261 | { | 2262 | { |
2262 | if (!afinfo) | 2263 | if (!afinfo) |
2263 | return; | 2264 | return; |
2264 | proc_net_remove(afinfo->name); | 2265 | proc_net_remove(&init_net, afinfo->name); |
2265 | memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); | 2266 | memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); |
2266 | } | 2267 | } |
2267 | 2268 | ||
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index b76398d1b454..87dd5bff315f 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/ktime.h> | 27 | #include <linux/ktime.h> |
28 | #include <linux/time.h> | 28 | #include <linux/time.h> |
29 | #include <net/net_namespace.h> | ||
29 | 30 | ||
30 | #include <net/tcp.h> | 31 | #include <net/tcp.h> |
31 | 32 | ||
@@ -228,7 +229,7 @@ static __init int tcpprobe_init(void) | |||
228 | if (!tcp_probe.log) | 229 | if (!tcp_probe.log) |
229 | goto err0; | 230 | goto err0; |
230 | 231 | ||
231 | if (!proc_net_fops_create(procname, S_IRUSR, &tcpprobe_fops)) | 232 | if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &tcpprobe_fops)) |
232 | goto err0; | 233 | goto err0; |
233 | 234 | ||
234 | ret = register_jprobe(&tcp_jprobe); | 235 | ret = register_jprobe(&tcp_jprobe); |
@@ -238,7 +239,7 @@ static __init int tcpprobe_init(void) | |||
238 | pr_info("TCP probe registered (port=%d)\n", port); | 239 | pr_info("TCP probe registered (port=%d)\n", port); |
239 | return 0; | 240 | return 0; |
240 | err1: | 241 | err1: |
241 | proc_net_remove(procname); | 242 | proc_net_remove(&init_net, procname); |
242 | err0: | 243 | err0: |
243 | kfree(tcp_probe.log); | 244 | kfree(tcp_probe.log); |
244 | return ret; | 245 | return ret; |
@@ -247,7 +248,7 @@ module_init(tcpprobe_init); | |||
247 | 248 | ||
248 | static __exit void tcpprobe_exit(void) | 249 | static __exit void tcpprobe_exit(void) |
249 | { | 250 | { |
250 | proc_net_remove(procname); | 251 | proc_net_remove(&init_net, procname); |
251 | unregister_jprobe(&tcp_jprobe); | 252 | unregister_jprobe(&tcp_jprobe); |
252 | kfree(tcp_probe.log); | 253 | kfree(tcp_probe.log); |
253 | } | 254 | } |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index a581b543bff7..ef4d901ee9ad 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -98,6 +98,7 @@ | |||
98 | #include <linux/skbuff.h> | 98 | #include <linux/skbuff.h> |
99 | #include <linux/proc_fs.h> | 99 | #include <linux/proc_fs.h> |
100 | #include <linux/seq_file.h> | 100 | #include <linux/seq_file.h> |
101 | #include <net/net_namespace.h> | ||
101 | #include <net/icmp.h> | 102 | #include <net/icmp.h> |
102 | #include <net/route.h> | 103 | #include <net/route.h> |
103 | #include <net/checksum.h> | 104 | #include <net/checksum.h> |
@@ -1566,7 +1567,7 @@ int udp_proc_register(struct udp_seq_afinfo *afinfo) | |||
1566 | afinfo->seq_fops->llseek = seq_lseek; | 1567 | afinfo->seq_fops->llseek = seq_lseek; |
1567 | afinfo->seq_fops->release = seq_release_private; | 1568 | afinfo->seq_fops->release = seq_release_private; |
1568 | 1569 | ||
1569 | p = proc_net_fops_create(afinfo->name, S_IRUGO, afinfo->seq_fops); | 1570 | p = proc_net_fops_create(&init_net, afinfo->name, S_IRUGO, afinfo->seq_fops); |
1570 | if (p) | 1571 | if (p) |
1571 | p->data = afinfo; | 1572 | p->data = afinfo; |
1572 | else | 1573 | else |
@@ -1578,7 +1579,7 @@ void udp_proc_unregister(struct udp_seq_afinfo *afinfo) | |||
1578 | { | 1579 | { |
1579 | if (!afinfo) | 1580 | if (!afinfo) |
1580 | return; | 1581 | return; |
1581 | proc_net_remove(afinfo->name); | 1582 | proc_net_remove(&init_net, afinfo->name); |
1582 | memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); | 1583 | memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); |
1583 | } | 1584 | } |
1584 | 1585 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 45b4c82148a0..cd2db728d183 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <linux/notifier.h> | 62 | #include <linux/notifier.h> |
63 | #include <linux/string.h> | 63 | #include <linux/string.h> |
64 | 64 | ||
65 | #include <net/net_namespace.h> | ||
65 | #include <net/sock.h> | 66 | #include <net/sock.h> |
66 | #include <net/snmp.h> | 67 | #include <net/snmp.h> |
67 | 68 | ||
@@ -2827,14 +2828,14 @@ static const struct file_operations if6_fops = { | |||
2827 | 2828 | ||
2828 | int __init if6_proc_init(void) | 2829 | int __init if6_proc_init(void) |
2829 | { | 2830 | { |
2830 | if (!proc_net_fops_create("if_inet6", S_IRUGO, &if6_fops)) | 2831 | if (!proc_net_fops_create(&init_net, "if_inet6", S_IRUGO, &if6_fops)) |
2831 | return -ENOMEM; | 2832 | return -ENOMEM; |
2832 | return 0; | 2833 | return 0; |
2833 | } | 2834 | } |
2834 | 2835 | ||
2835 | void if6_proc_exit(void) | 2836 | void if6_proc_exit(void) |
2836 | { | 2837 | { |
2837 | proc_net_remove("if_inet6"); | 2838 | proc_net_remove(&init_net, "if_inet6"); |
2838 | } | 2839 | } |
2839 | #endif /* CONFIG_PROC_FS */ | 2840 | #endif /* CONFIG_PROC_FS */ |
2840 | 2841 | ||
@@ -4293,6 +4294,6 @@ void __exit addrconf_cleanup(void) | |||
4293 | rtnl_unlock(); | 4294 | rtnl_unlock(); |
4294 | 4295 | ||
4295 | #ifdef CONFIG_PROC_FS | 4296 | #ifdef CONFIG_PROC_FS |
4296 | proc_net_remove("if_inet6"); | 4297 | proc_net_remove(&init_net, "if_inet6"); |
4297 | #endif | 4298 | #endif |
4298 | } | 4299 | } |
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index b8c533fbdb63..0bd665498d06 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
32 | 32 | ||
33 | #include <net/net_namespace.h> | ||
33 | #include <net/sock.h> | 34 | #include <net/sock.h> |
34 | #include <net/snmp.h> | 35 | #include <net/snmp.h> |
35 | 36 | ||
@@ -578,7 +579,7 @@ static const struct file_operations ac6_seq_fops = { | |||
578 | 579 | ||
579 | int __init ac6_proc_init(void) | 580 | int __init ac6_proc_init(void) |
580 | { | 581 | { |
581 | if (!proc_net_fops_create("anycast6", S_IRUGO, &ac6_seq_fops)) | 582 | if (!proc_net_fops_create(&init_net, "anycast6", S_IRUGO, &ac6_seq_fops)) |
582 | return -ENOMEM; | 583 | return -ENOMEM; |
583 | 584 | ||
584 | return 0; | 585 | return 0; |
@@ -586,7 +587,7 @@ int __init ac6_proc_init(void) | |||
586 | 587 | ||
587 | void ac6_proc_exit(void) | 588 | void ac6_proc_exit(void) |
588 | { | 589 | { |
589 | proc_net_remove("anycast6"); | 590 | proc_net_remove(&init_net, "anycast6"); |
590 | } | 591 | } |
591 | #endif | 592 | #endif |
592 | 593 | ||
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index 413a4ebb195c..1791399c7f10 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | 23 | ||
24 | #include <net/net_namespace.h> | ||
24 | #include <net/sock.h> | 25 | #include <net/sock.h> |
25 | 26 | ||
26 | #include <net/ipv6.h> | 27 | #include <net/ipv6.h> |
@@ -690,7 +691,7 @@ static const struct file_operations ip6fl_seq_fops = { | |||
690 | void ip6_flowlabel_init(void) | 691 | void ip6_flowlabel_init(void) |
691 | { | 692 | { |
692 | #ifdef CONFIG_PROC_FS | 693 | #ifdef CONFIG_PROC_FS |
693 | proc_net_fops_create("ip6_flowlabel", S_IRUGO, &ip6fl_seq_fops); | 694 | proc_net_fops_create(&init_net, "ip6_flowlabel", S_IRUGO, &ip6fl_seq_fops); |
694 | #endif | 695 | #endif |
695 | } | 696 | } |
696 | 697 | ||
@@ -698,6 +699,6 @@ void ip6_flowlabel_cleanup(void) | |||
698 | { | 699 | { |
699 | del_timer(&ip6_fl_gc_timer); | 700 | del_timer(&ip6_fl_gc_timer); |
700 | #ifdef CONFIG_PROC_FS | 701 | #ifdef CONFIG_PROC_FS |
701 | proc_net_remove("ip6_flowlabel"); | 702 | proc_net_remove(&init_net, "ip6_flowlabel"); |
702 | #endif | 703 | #endif |
703 | } | 704 | } |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index ae9881832a7e..a41d5a0b50cc 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/netfilter.h> | 49 | #include <linux/netfilter.h> |
50 | #include <linux/netfilter_ipv6.h> | 50 | #include <linux/netfilter_ipv6.h> |
51 | 51 | ||
52 | #include <net/net_namespace.h> | ||
52 | #include <net/sock.h> | 53 | #include <net/sock.h> |
53 | #include <net/snmp.h> | 54 | #include <net/snmp.h> |
54 | 55 | ||
@@ -2658,8 +2659,8 @@ int __init igmp6_init(struct net_proto_family *ops) | |||
2658 | np->hop_limit = 1; | 2659 | np->hop_limit = 1; |
2659 | 2660 | ||
2660 | #ifdef CONFIG_PROC_FS | 2661 | #ifdef CONFIG_PROC_FS |
2661 | proc_net_fops_create("igmp6", S_IRUGO, &igmp6_mc_seq_fops); | 2662 | proc_net_fops_create(&init_net, "igmp6", S_IRUGO, &igmp6_mc_seq_fops); |
2662 | proc_net_fops_create("mcfilter6", S_IRUGO, &igmp6_mcf_seq_fops); | 2663 | proc_net_fops_create(&init_net, "mcfilter6", S_IRUGO, &igmp6_mcf_seq_fops); |
2663 | #endif | 2664 | #endif |
2664 | 2665 | ||
2665 | return 0; | 2666 | return 0; |
@@ -2671,7 +2672,7 @@ void igmp6_cleanup(void) | |||
2671 | igmp6_socket = NULL; /* for safety */ | 2672 | igmp6_socket = NULL; /* for safety */ |
2672 | 2673 | ||
2673 | #ifdef CONFIG_PROC_FS | 2674 | #ifdef CONFIG_PROC_FS |
2674 | proc_net_remove("mcfilter6"); | 2675 | proc_net_remove(&init_net, "mcfilter6"); |
2675 | proc_net_remove("igmp6"); | 2676 | proc_net_remove(&init_net, "igmp6"); |
2676 | #endif | 2677 | #endif |
2677 | } | 2678 | } |
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index 0004db38af6d..dfc58fbdb68b 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/sysctl.h> | 24 | #include <linux/sysctl.h> |
25 | #include <linux/proc_fs.h> | 25 | #include <linux/proc_fs.h> |
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | #include <net/net_namespace.h> | ||
27 | #include <net/sock.h> | 28 | #include <net/sock.h> |
28 | #include <net/ipv6.h> | 29 | #include <net/ipv6.h> |
29 | #include <net/ip6_route.h> | 30 | #include <net/ip6_route.h> |
@@ -664,7 +665,7 @@ static int __init ip6_queue_init(void) | |||
664 | goto cleanup_netlink_notifier; | 665 | goto cleanup_netlink_notifier; |
665 | } | 666 | } |
666 | 667 | ||
667 | proc = proc_net_create(IPQ_PROC_FS_NAME, 0, ipq_get_info); | 668 | proc = proc_net_create(&init_net, IPQ_PROC_FS_NAME, 0, ipq_get_info); |
668 | if (proc) | 669 | if (proc) |
669 | proc->owner = THIS_MODULE; | 670 | proc->owner = THIS_MODULE; |
670 | else { | 671 | else { |
@@ -685,7 +686,7 @@ static int __init ip6_queue_init(void) | |||
685 | cleanup_sysctl: | 686 | cleanup_sysctl: |
686 | unregister_sysctl_table(ipq_sysctl_header); | 687 | unregister_sysctl_table(ipq_sysctl_header); |
687 | unregister_netdevice_notifier(&ipq_dev_notifier); | 688 | unregister_netdevice_notifier(&ipq_dev_notifier); |
688 | proc_net_remove(IPQ_PROC_FS_NAME); | 689 | proc_net_remove(&init_net, IPQ_PROC_FS_NAME); |
689 | 690 | ||
690 | cleanup_ipqnl: | 691 | cleanup_ipqnl: |
691 | sock_release(ipqnl->sk_socket); | 692 | sock_release(ipqnl->sk_socket); |
@@ -705,7 +706,7 @@ static void __exit ip6_queue_fini(void) | |||
705 | 706 | ||
706 | unregister_sysctl_table(ipq_sysctl_header); | 707 | unregister_sysctl_table(ipq_sysctl_header); |
707 | unregister_netdevice_notifier(&ipq_dev_notifier); | 708 | unregister_netdevice_notifier(&ipq_dev_notifier); |
708 | proc_net_remove(IPQ_PROC_FS_NAME); | 709 | proc_net_remove(&init_net, IPQ_PROC_FS_NAME); |
709 | 710 | ||
710 | sock_release(ipqnl->sk_socket); | 711 | sock_release(ipqnl->sk_socket); |
711 | mutex_lock(&ipqnl_mutex); | 712 | mutex_lock(&ipqnl_mutex); |
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 920dc9cf6a84..a712a2289484 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/proc_fs.h> | 23 | #include <linux/proc_fs.h> |
24 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
25 | #include <linux/stddef.h> | 25 | #include <linux/stddef.h> |
26 | #include <net/net_namespace.h> | ||
26 | #include <net/ip.h> | 27 | #include <net/ip.h> |
27 | #include <net/sock.h> | 28 | #include <net/sock.h> |
28 | #include <net/tcp.h> | 29 | #include <net/tcp.h> |
@@ -231,22 +232,22 @@ int __init ipv6_misc_proc_init(void) | |||
231 | { | 232 | { |
232 | int rc = 0; | 233 | int rc = 0; |
233 | 234 | ||
234 | if (!proc_net_fops_create("snmp6", S_IRUGO, &snmp6_seq_fops)) | 235 | if (!proc_net_fops_create(&init_net, "snmp6", S_IRUGO, &snmp6_seq_fops)) |
235 | goto proc_snmp6_fail; | 236 | goto proc_snmp6_fail; |
236 | 237 | ||
237 | proc_net_devsnmp6 = proc_mkdir("dev_snmp6", proc_net); | 238 | proc_net_devsnmp6 = proc_mkdir("dev_snmp6", init_net.proc_net); |
238 | if (!proc_net_devsnmp6) | 239 | if (!proc_net_devsnmp6) |
239 | goto proc_dev_snmp6_fail; | 240 | goto proc_dev_snmp6_fail; |
240 | 241 | ||
241 | if (!proc_net_fops_create("sockstat6", S_IRUGO, &sockstat6_seq_fops)) | 242 | if (!proc_net_fops_create(&init_net, "sockstat6", S_IRUGO, &sockstat6_seq_fops)) |
242 | goto proc_sockstat6_fail; | 243 | goto proc_sockstat6_fail; |
243 | out: | 244 | out: |
244 | return rc; | 245 | return rc; |
245 | 246 | ||
246 | proc_sockstat6_fail: | 247 | proc_sockstat6_fail: |
247 | proc_net_remove("dev_snmp6"); | 248 | proc_net_remove(&init_net, "dev_snmp6"); |
248 | proc_dev_snmp6_fail: | 249 | proc_dev_snmp6_fail: |
249 | proc_net_remove("snmp6"); | 250 | proc_net_remove(&init_net, "snmp6"); |
250 | proc_snmp6_fail: | 251 | proc_snmp6_fail: |
251 | rc = -ENOMEM; | 252 | rc = -ENOMEM; |
252 | goto out; | 253 | goto out; |
@@ -254,8 +255,8 @@ proc_snmp6_fail: | |||
254 | 255 | ||
255 | void ipv6_misc_proc_exit(void) | 256 | void ipv6_misc_proc_exit(void) |
256 | { | 257 | { |
257 | proc_net_remove("sockstat6"); | 258 | proc_net_remove(&init_net, "sockstat6"); |
258 | proc_net_remove("dev_snmp6"); | 259 | proc_net_remove(&init_net, "dev_snmp6"); |
259 | proc_net_remove("snmp6"); | 260 | proc_net_remove(&init_net, "snmp6"); |
260 | } | 261 | } |
261 | 262 | ||
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 77167afa3455..38a3d21c2585 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
36 | #include <asm/ioctls.h> | 36 | #include <asm/ioctls.h> |
37 | 37 | ||
38 | #include <net/net_namespace.h> | ||
38 | #include <net/ip.h> | 39 | #include <net/ip.h> |
39 | #include <net/sock.h> | 40 | #include <net/sock.h> |
40 | #include <net/snmp.h> | 41 | #include <net/snmp.h> |
@@ -1315,13 +1316,13 @@ static const struct file_operations raw6_seq_fops = { | |||
1315 | 1316 | ||
1316 | int __init raw6_proc_init(void) | 1317 | int __init raw6_proc_init(void) |
1317 | { | 1318 | { |
1318 | if (!proc_net_fops_create("raw6", S_IRUGO, &raw6_seq_fops)) | 1319 | if (!proc_net_fops_create(&init_net, "raw6", S_IRUGO, &raw6_seq_fops)) |
1319 | return -ENOMEM; | 1320 | return -ENOMEM; |
1320 | return 0; | 1321 | return 0; |
1321 | } | 1322 | } |
1322 | 1323 | ||
1323 | void raw6_proc_exit(void) | 1324 | void raw6_proc_exit(void) |
1324 | { | 1325 | { |
1325 | proc_net_remove("raw6"); | 1326 | proc_net_remove(&init_net, "raw6"); |
1326 | } | 1327 | } |
1327 | #endif /* CONFIG_PROC_FS */ | 1328 | #endif /* CONFIG_PROC_FS */ |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 55ea80fac601..f4f0c341e5c8 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/seq_file.h> | 44 | #include <linux/seq_file.h> |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #include <net/net_namespace.h> | ||
47 | #include <net/snmp.h> | 48 | #include <net/snmp.h> |
48 | #include <net/ipv6.h> | 49 | #include <net/ipv6.h> |
49 | #include <net/ip6_fib.h> | 50 | #include <net/ip6_fib.h> |
@@ -2561,11 +2562,11 @@ void __init ip6_route_init(void) | |||
2561 | 2562 | ||
2562 | fib6_init(); | 2563 | fib6_init(); |
2563 | #ifdef CONFIG_PROC_FS | 2564 | #ifdef CONFIG_PROC_FS |
2564 | p = proc_net_create("ipv6_route", 0, rt6_proc_info); | 2565 | p = proc_net_create(&init_net, "ipv6_route", 0, rt6_proc_info); |
2565 | if (p) | 2566 | if (p) |
2566 | p->owner = THIS_MODULE; | 2567 | p->owner = THIS_MODULE; |
2567 | 2568 | ||
2568 | proc_net_fops_create("rt6_stats", S_IRUGO, &rt6_stats_seq_fops); | 2569 | proc_net_fops_create(&init_net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops); |
2569 | #endif | 2570 | #endif |
2570 | #ifdef CONFIG_XFRM | 2571 | #ifdef CONFIG_XFRM |
2571 | xfrm6_init(); | 2572 | xfrm6_init(); |
@@ -2585,8 +2586,8 @@ void ip6_route_cleanup(void) | |||
2585 | fib6_rules_cleanup(); | 2586 | fib6_rules_cleanup(); |
2586 | #endif | 2587 | #endif |
2587 | #ifdef CONFIG_PROC_FS | 2588 | #ifdef CONFIG_PROC_FS |
2588 | proc_net_remove("ipv6_route"); | 2589 | proc_net_remove(&init_net, "ipv6_route"); |
2589 | proc_net_remove("rt6_stats"); | 2590 | proc_net_remove(&init_net, "rt6_stats"); |
2590 | #endif | 2591 | #endif |
2591 | #ifdef CONFIG_XFRM | 2592 | #ifdef CONFIG_XFRM |
2592 | xfrm6_fini(); | 2593 | xfrm6_fini(); |
diff --git a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c index 4226e71ae1e3..d483a00dc427 100644 --- a/net/ipx/ipx_proc.c +++ b/net/ipx/ipx_proc.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/proc_fs.h> | 9 | #include <linux/proc_fs.h> |
10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
11 | #include <linux/seq_file.h> | 11 | #include <linux/seq_file.h> |
12 | #include <net/net_namespace.h> | ||
12 | #include <net/tcp_states.h> | 13 | #include <net/tcp_states.h> |
13 | #include <net/ipx.h> | 14 | #include <net/ipx.h> |
14 | 15 | ||
@@ -353,7 +354,7 @@ int __init ipx_proc_init(void) | |||
353 | struct proc_dir_entry *p; | 354 | struct proc_dir_entry *p; |
354 | int rc = -ENOMEM; | 355 | int rc = -ENOMEM; |
355 | 356 | ||
356 | ipx_proc_dir = proc_mkdir("ipx", proc_net); | 357 | ipx_proc_dir = proc_mkdir("ipx", init_net.proc_net); |
357 | 358 | ||
358 | if (!ipx_proc_dir) | 359 | if (!ipx_proc_dir) |
359 | goto out; | 360 | goto out; |
@@ -381,7 +382,7 @@ out_socket: | |||
381 | out_route: | 382 | out_route: |
382 | remove_proc_entry("interface", ipx_proc_dir); | 383 | remove_proc_entry("interface", ipx_proc_dir); |
383 | out_interface: | 384 | out_interface: |
384 | remove_proc_entry("ipx", proc_net); | 385 | remove_proc_entry("ipx", init_net.proc_net); |
385 | goto out; | 386 | goto out; |
386 | } | 387 | } |
387 | 388 | ||
@@ -390,7 +391,7 @@ void __exit ipx_proc_exit(void) | |||
390 | remove_proc_entry("interface", ipx_proc_dir); | 391 | remove_proc_entry("interface", ipx_proc_dir); |
391 | remove_proc_entry("route", ipx_proc_dir); | 392 | remove_proc_entry("route", ipx_proc_dir); |
392 | remove_proc_entry("socket", ipx_proc_dir); | 393 | remove_proc_entry("socket", ipx_proc_dir); |
393 | remove_proc_entry("ipx", proc_net); | 394 | remove_proc_entry("ipx", init_net.proc_net); |
394 | } | 395 | } |
395 | 396 | ||
396 | #else /* CONFIG_PROC_FS */ | 397 | #else /* CONFIG_PROC_FS */ |
diff --git a/net/irda/irproc.c b/net/irda/irproc.c index 181cb51b48a8..cae24fbda966 100644 --- a/net/irda/irproc.c +++ b/net/irda/irproc.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <net/net_namespace.h> | ||
31 | 32 | ||
32 | #include <net/irda/irda.h> | 33 | #include <net/irda/irda.h> |
33 | #include <net/irda/irlap.h> | 34 | #include <net/irda/irlap.h> |
@@ -66,7 +67,7 @@ void __init irda_proc_register(void) | |||
66 | int i; | 67 | int i; |
67 | struct proc_dir_entry *d; | 68 | struct proc_dir_entry *d; |
68 | 69 | ||
69 | proc_irda = proc_mkdir("irda", proc_net); | 70 | proc_irda = proc_mkdir("irda", init_net.proc_net); |
70 | if (proc_irda == NULL) | 71 | if (proc_irda == NULL) |
71 | return; | 72 | return; |
72 | proc_irda->owner = THIS_MODULE; | 73 | proc_irda->owner = THIS_MODULE; |
@@ -92,7 +93,7 @@ void irda_proc_unregister(void) | |||
92 | for (i=0; i<ARRAY_SIZE(irda_dirs); i++) | 93 | for (i=0; i<ARRAY_SIZE(irda_dirs); i++) |
93 | remove_proc_entry(irda_dirs[i].name, proc_irda); | 94 | remove_proc_entry(irda_dirs[i].name, proc_irda); |
94 | 95 | ||
95 | remove_proc_entry("irda", proc_net); | 96 | remove_proc_entry("irda", init_net.proc_net); |
96 | proc_irda = NULL; | 97 | proc_irda = NULL; |
97 | } | 98 | } |
98 | } | 99 | } |
diff --git a/net/key/af_key.c b/net/key/af_key.c index 0241fff95137..5b802bbb856e 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/in6.h> | 26 | #include <linux/in6.h> |
27 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <net/net_namespace.h> | ||
29 | #include <net/xfrm.h> | 30 | #include <net/xfrm.h> |
30 | 31 | ||
31 | #include <net/sock.h> | 32 | #include <net/sock.h> |
@@ -3776,7 +3777,7 @@ static struct xfrm_mgr pfkeyv2_mgr = | |||
3776 | static void __exit ipsec_pfkey_exit(void) | 3777 | static void __exit ipsec_pfkey_exit(void) |
3777 | { | 3778 | { |
3778 | xfrm_unregister_km(&pfkeyv2_mgr); | 3779 | xfrm_unregister_km(&pfkeyv2_mgr); |
3779 | remove_proc_entry("net/pfkey", NULL); | 3780 | remove_proc_entry("pfkey", init_net.proc_net); |
3780 | sock_unregister(PF_KEY); | 3781 | sock_unregister(PF_KEY); |
3781 | proto_unregister(&key_proto); | 3782 | proto_unregister(&key_proto); |
3782 | } | 3783 | } |
@@ -3793,7 +3794,7 @@ static int __init ipsec_pfkey_init(void) | |||
3793 | goto out_unregister_key_proto; | 3794 | goto out_unregister_key_proto; |
3794 | #ifdef CONFIG_PROC_FS | 3795 | #ifdef CONFIG_PROC_FS |
3795 | err = -ENOMEM; | 3796 | err = -ENOMEM; |
3796 | if (create_proc_read_entry("net/pfkey", 0, NULL, pfkey_read_proc, NULL) == NULL) | 3797 | if (create_proc_read_entry("pfkey", 0, init_net.proc_net, pfkey_read_proc, NULL) == NULL) |
3797 | goto out_sock_unregister; | 3798 | goto out_sock_unregister; |
3798 | #endif | 3799 | #endif |
3799 | err = xfrm_register_km(&pfkeyv2_mgr); | 3800 | err = xfrm_register_km(&pfkeyv2_mgr); |
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c index 49be6c902c83..4865d82896b1 100644 --- a/net/llc/llc_proc.c +++ b/net/llc/llc_proc.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
20 | #include <net/net_namespace.h> | ||
20 | #include <net/sock.h> | 21 | #include <net/sock.h> |
21 | #include <net/llc.h> | 22 | #include <net/llc.h> |
22 | #include <net/llc_c_ac.h> | 23 | #include <net/llc_c_ac.h> |
@@ -231,7 +232,7 @@ int __init llc_proc_init(void) | |||
231 | int rc = -ENOMEM; | 232 | int rc = -ENOMEM; |
232 | struct proc_dir_entry *p; | 233 | struct proc_dir_entry *p; |
233 | 234 | ||
234 | llc_proc_dir = proc_mkdir("llc", proc_net); | 235 | llc_proc_dir = proc_mkdir("llc", init_net.proc_net); |
235 | if (!llc_proc_dir) | 236 | if (!llc_proc_dir) |
236 | goto out; | 237 | goto out; |
237 | llc_proc_dir->owner = THIS_MODULE; | 238 | llc_proc_dir->owner = THIS_MODULE; |
@@ -254,7 +255,7 @@ out: | |||
254 | out_core: | 255 | out_core: |
255 | remove_proc_entry("socket", llc_proc_dir); | 256 | remove_proc_entry("socket", llc_proc_dir); |
256 | out_socket: | 257 | out_socket: |
257 | remove_proc_entry("llc", proc_net); | 258 | remove_proc_entry("llc", init_net.proc_net); |
258 | goto out; | 259 | goto out; |
259 | } | 260 | } |
260 | 261 | ||
@@ -262,5 +263,5 @@ void llc_proc_exit(void) | |||
262 | { | 263 | { |
263 | remove_proc_entry("socket", llc_proc_dir); | 264 | remove_proc_entry("socket", llc_proc_dir); |
264 | remove_proc_entry("core", llc_proc_dir); | 265 | remove_proc_entry("core", llc_proc_dir); |
265 | remove_proc_entry("llc", proc_net); | 266 | remove_proc_entry("llc", init_net.proc_net); |
266 | } | 267 | } |
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 381a77cf0c9e..a523fa4136ed 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/inetdevice.h> | 19 | #include <linux/inetdevice.h> |
20 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <net/net_namespace.h> | ||
22 | #include <net/sock.h> | 23 | #include <net/sock.h> |
23 | 24 | ||
24 | #include "nf_internals.h" | 25 | #include "nf_internals.h" |
@@ -293,7 +294,7 @@ void __init netfilter_init(void) | |||
293 | } | 294 | } |
294 | 295 | ||
295 | #ifdef CONFIG_PROC_FS | 296 | #ifdef CONFIG_PROC_FS |
296 | proc_net_netfilter = proc_mkdir("netfilter", proc_net); | 297 | proc_net_netfilter = proc_mkdir("netfilter", init_net.proc_net); |
297 | if (!proc_net_netfilter) | 298 | if (!proc_net_netfilter) |
298 | panic("cannot create netfilter proc entry"); | 299 | panic("cannot create netfilter proc entry"); |
299 | #endif | 300 | #endif |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index 3ac64e25f10c..8a3e3af656bf 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/percpu.h> | 20 | #include <linux/percpu.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/jhash.h> | 22 | #include <linux/jhash.h> |
23 | #include <net/net_namespace.h> | ||
23 | 24 | ||
24 | #include <net/netfilter/nf_conntrack.h> | 25 | #include <net/netfilter/nf_conntrack.h> |
25 | #include <net/netfilter/nf_conntrack_core.h> | 26 | #include <net/netfilter/nf_conntrack_core.h> |
@@ -505,7 +506,7 @@ static int __init exp_proc_init(void) | |||
505 | #ifdef CONFIG_PROC_FS | 506 | #ifdef CONFIG_PROC_FS |
506 | struct proc_dir_entry *proc; | 507 | struct proc_dir_entry *proc; |
507 | 508 | ||
508 | proc = proc_net_fops_create("nf_conntrack_expect", 0440, &exp_file_ops); | 509 | proc = proc_net_fops_create(&init_net, "nf_conntrack_expect", 0440, &exp_file_ops); |
509 | if (!proc) | 510 | if (!proc) |
510 | return -ENOMEM; | 511 | return -ENOMEM; |
511 | #endif /* CONFIG_PROC_FS */ | 512 | #endif /* CONFIG_PROC_FS */ |
@@ -515,7 +516,7 @@ static int __init exp_proc_init(void) | |||
515 | static void exp_proc_remove(void) | 516 | static void exp_proc_remove(void) |
516 | { | 517 | { |
517 | #ifdef CONFIG_PROC_FS | 518 | #ifdef CONFIG_PROC_FS |
518 | proc_net_remove("nf_conntrack_expect"); | 519 | proc_net_remove(&init_net, "nf_conntrack_expect"); |
519 | #endif /* CONFIG_PROC_FS */ | 520 | #endif /* CONFIG_PROC_FS */ |
520 | } | 521 | } |
521 | 522 | ||
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index a4ce5e887997..2a19c5f1240f 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/seq_file.h> | 14 | #include <linux/seq_file.h> |
15 | #include <linux/percpu.h> | 15 | #include <linux/percpu.h> |
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | #include <net/net_namespace.h> | ||
17 | #ifdef CONFIG_SYSCTL | 18 | #ifdef CONFIG_SYSCTL |
18 | #include <linux/sysctl.h> | 19 | #include <linux/sysctl.h> |
19 | #endif | 20 | #endif |
@@ -420,10 +421,10 @@ static int __init nf_conntrack_standalone_init(void) | |||
420 | return ret; | 421 | return ret; |
421 | 422 | ||
422 | #ifdef CONFIG_PROC_FS | 423 | #ifdef CONFIG_PROC_FS |
423 | proc = proc_net_fops_create("nf_conntrack", 0440, &ct_file_ops); | 424 | proc = proc_net_fops_create(&init_net, "nf_conntrack", 0440, &ct_file_ops); |
424 | if (!proc) goto cleanup_init; | 425 | if (!proc) goto cleanup_init; |
425 | 426 | ||
426 | proc_stat = create_proc_entry("nf_conntrack", S_IRUGO, proc_net_stat); | 427 | proc_stat = create_proc_entry("nf_conntrack", S_IRUGO, init_net.proc_net_stat); |
427 | if (!proc_stat) | 428 | if (!proc_stat) |
428 | goto cleanup_proc; | 429 | goto cleanup_proc; |
429 | 430 | ||
@@ -444,9 +445,9 @@ static int __init nf_conntrack_standalone_init(void) | |||
444 | cleanup_proc_stat: | 445 | cleanup_proc_stat: |
445 | #endif | 446 | #endif |
446 | #ifdef CONFIG_PROC_FS | 447 | #ifdef CONFIG_PROC_FS |
447 | remove_proc_entry("nf_conntrack", proc_net_stat); | 448 | remove_proc_entry("nf_conntrack", init_net. proc_net_stat); |
448 | cleanup_proc: | 449 | cleanup_proc: |
449 | proc_net_remove("nf_conntrack"); | 450 | proc_net_remove(&init_net, "nf_conntrack"); |
450 | cleanup_init: | 451 | cleanup_init: |
451 | #endif /* CNFIG_PROC_FS */ | 452 | #endif /* CNFIG_PROC_FS */ |
452 | nf_conntrack_cleanup(); | 453 | nf_conntrack_cleanup(); |
@@ -459,8 +460,8 @@ static void __exit nf_conntrack_standalone_fini(void) | |||
459 | unregister_sysctl_table(nf_ct_sysctl_header); | 460 | unregister_sysctl_table(nf_ct_sysctl_header); |
460 | #endif | 461 | #endif |
461 | #ifdef CONFIG_PROC_FS | 462 | #ifdef CONFIG_PROC_FS |
462 | remove_proc_entry("nf_conntrack", proc_net_stat); | 463 | remove_proc_entry("nf_conntrack", init_net.proc_net_stat); |
463 | proc_net_remove("nf_conntrack"); | 464 | proc_net_remove(&init_net, "nf_conntrack"); |
464 | #endif /* CNFIG_PROC_FS */ | 465 | #endif /* CNFIG_PROC_FS */ |
465 | nf_conntrack_cleanup(); | 466 | nf_conntrack_cleanup(); |
466 | } | 467 | } |
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index cc2baa6d5a7a..d9a3bded0d00 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <net/net_namespace.h> | ||
25 | 26 | ||
26 | #include <linux/netfilter/x_tables.h> | 27 | #include <linux/netfilter/x_tables.h> |
27 | #include <linux/netfilter_arp.h> | 28 | #include <linux/netfilter_arp.h> |
@@ -795,7 +796,7 @@ int xt_proto_init(int af) | |||
795 | #ifdef CONFIG_PROC_FS | 796 | #ifdef CONFIG_PROC_FS |
796 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 797 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
797 | strlcat(buf, FORMAT_TABLES, sizeof(buf)); | 798 | strlcat(buf, FORMAT_TABLES, sizeof(buf)); |
798 | proc = proc_net_fops_create(buf, 0440, &xt_file_ops); | 799 | proc = proc_net_fops_create(&init_net, buf, 0440, &xt_file_ops); |
799 | if (!proc) | 800 | if (!proc) |
800 | goto out; | 801 | goto out; |
801 | proc->data = (void *) ((unsigned long) af | (TABLE << 16)); | 802 | proc->data = (void *) ((unsigned long) af | (TABLE << 16)); |
@@ -803,14 +804,14 @@ int xt_proto_init(int af) | |||
803 | 804 | ||
804 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 805 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
805 | strlcat(buf, FORMAT_MATCHES, sizeof(buf)); | 806 | strlcat(buf, FORMAT_MATCHES, sizeof(buf)); |
806 | proc = proc_net_fops_create(buf, 0440, &xt_file_ops); | 807 | proc = proc_net_fops_create(&init_net, buf, 0440, &xt_file_ops); |
807 | if (!proc) | 808 | if (!proc) |
808 | goto out_remove_tables; | 809 | goto out_remove_tables; |
809 | proc->data = (void *) ((unsigned long) af | (MATCH << 16)); | 810 | proc->data = (void *) ((unsigned long) af | (MATCH << 16)); |
810 | 811 | ||
811 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 812 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
812 | strlcat(buf, FORMAT_TARGETS, sizeof(buf)); | 813 | strlcat(buf, FORMAT_TARGETS, sizeof(buf)); |
813 | proc = proc_net_fops_create(buf, 0440, &xt_file_ops); | 814 | proc = proc_net_fops_create(&init_net, buf, 0440, &xt_file_ops); |
814 | if (!proc) | 815 | if (!proc) |
815 | goto out_remove_matches; | 816 | goto out_remove_matches; |
816 | proc->data = (void *) ((unsigned long) af | (TARGET << 16)); | 817 | proc->data = (void *) ((unsigned long) af | (TARGET << 16)); |
@@ -822,12 +823,12 @@ int xt_proto_init(int af) | |||
822 | out_remove_matches: | 823 | out_remove_matches: |
823 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 824 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
824 | strlcat(buf, FORMAT_MATCHES, sizeof(buf)); | 825 | strlcat(buf, FORMAT_MATCHES, sizeof(buf)); |
825 | proc_net_remove(buf); | 826 | proc_net_remove(&init_net, buf); |
826 | 827 | ||
827 | out_remove_tables: | 828 | out_remove_tables: |
828 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 829 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
829 | strlcat(buf, FORMAT_TABLES, sizeof(buf)); | 830 | strlcat(buf, FORMAT_TABLES, sizeof(buf)); |
830 | proc_net_remove(buf); | 831 | proc_net_remove(&init_net, buf); |
831 | out: | 832 | out: |
832 | return -1; | 833 | return -1; |
833 | #endif | 834 | #endif |
@@ -841,15 +842,15 @@ void xt_proto_fini(int af) | |||
841 | 842 | ||
842 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 843 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
843 | strlcat(buf, FORMAT_TABLES, sizeof(buf)); | 844 | strlcat(buf, FORMAT_TABLES, sizeof(buf)); |
844 | proc_net_remove(buf); | 845 | proc_net_remove(&init_net, buf); |
845 | 846 | ||
846 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 847 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
847 | strlcat(buf, FORMAT_TARGETS, sizeof(buf)); | 848 | strlcat(buf, FORMAT_TARGETS, sizeof(buf)); |
848 | proc_net_remove(buf); | 849 | proc_net_remove(&init_net, buf); |
849 | 850 | ||
850 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 851 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
851 | strlcat(buf, FORMAT_MATCHES, sizeof(buf)); | 852 | strlcat(buf, FORMAT_MATCHES, sizeof(buf)); |
852 | proc_net_remove(buf); | 853 | proc_net_remove(&init_net, buf); |
853 | #endif /*CONFIG_PROC_FS*/ | 854 | #endif /*CONFIG_PROC_FS*/ |
854 | } | 855 | } |
855 | EXPORT_SYMBOL_GPL(xt_proto_fini); | 856 | EXPORT_SYMBOL_GPL(xt_proto_fini); |
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index bd45f9d3f7d0..19103678bf20 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/in.h> | 21 | #include <linux/in.h> |
22 | #include <linux/ip.h> | 22 | #include <linux/ip.h> |
23 | #include <linux/ipv6.h> | 23 | #include <linux/ipv6.h> |
24 | #include <net/net_namespace.h> | ||
24 | 25 | ||
25 | #include <linux/netfilter/x_tables.h> | 26 | #include <linux/netfilter/x_tables.h> |
26 | #include <linux/netfilter_ipv4/ip_tables.h> | 27 | #include <linux/netfilter_ipv4/ip_tables.h> |
@@ -743,13 +744,13 @@ static int __init xt_hashlimit_init(void) | |||
743 | printk(KERN_ERR "xt_hashlimit: unable to create slab cache\n"); | 744 | printk(KERN_ERR "xt_hashlimit: unable to create slab cache\n"); |
744 | goto err2; | 745 | goto err2; |
745 | } | 746 | } |
746 | hashlimit_procdir4 = proc_mkdir("ipt_hashlimit", proc_net); | 747 | hashlimit_procdir4 = proc_mkdir("ipt_hashlimit", init_net.proc_net); |
747 | if (!hashlimit_procdir4) { | 748 | if (!hashlimit_procdir4) { |
748 | printk(KERN_ERR "xt_hashlimit: unable to create proc dir " | 749 | printk(KERN_ERR "xt_hashlimit: unable to create proc dir " |
749 | "entry\n"); | 750 | "entry\n"); |
750 | goto err3; | 751 | goto err3; |
751 | } | 752 | } |
752 | hashlimit_procdir6 = proc_mkdir("ip6t_hashlimit", proc_net); | 753 | hashlimit_procdir6 = proc_mkdir("ip6t_hashlimit", init_net.proc_net); |
753 | if (!hashlimit_procdir6) { | 754 | if (!hashlimit_procdir6) { |
754 | printk(KERN_ERR "xt_hashlimit: unable to create proc dir " | 755 | printk(KERN_ERR "xt_hashlimit: unable to create proc dir " |
755 | "entry\n"); | 756 | "entry\n"); |
@@ -757,7 +758,7 @@ static int __init xt_hashlimit_init(void) | |||
757 | } | 758 | } |
758 | return 0; | 759 | return 0; |
759 | err4: | 760 | err4: |
760 | remove_proc_entry("ipt_hashlimit", proc_net); | 761 | remove_proc_entry("ipt_hashlimit", init_net.proc_net); |
761 | err3: | 762 | err3: |
762 | kmem_cache_destroy(hashlimit_cachep); | 763 | kmem_cache_destroy(hashlimit_cachep); |
763 | err2: | 764 | err2: |
@@ -769,8 +770,8 @@ err1: | |||
769 | 770 | ||
770 | static void __exit xt_hashlimit_fini(void) | 771 | static void __exit xt_hashlimit_fini(void) |
771 | { | 772 | { |
772 | remove_proc_entry("ipt_hashlimit", proc_net); | 773 | remove_proc_entry("ipt_hashlimit", init_net.proc_net); |
773 | remove_proc_entry("ip6t_hashlimit", proc_net); | 774 | remove_proc_entry("ip6t_hashlimit", init_net.proc_net); |
774 | kmem_cache_destroy(hashlimit_cachep); | 775 | kmem_cache_destroy(hashlimit_cachep); |
775 | xt_unregister_matches(xt_hashlimit, ARRAY_SIZE(xt_hashlimit)); | 776 | xt_unregister_matches(xt_hashlimit, ARRAY_SIZE(xt_hashlimit)); |
776 | } | 777 | } |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index a78d962e2c70..3982f13dab17 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/selinux.h> | 57 | #include <linux/selinux.h> |
58 | #include <linux/mutex.h> | 58 | #include <linux/mutex.h> |
59 | 59 | ||
60 | #include <net/net_namespace.h> | ||
60 | #include <net/sock.h> | 61 | #include <net/sock.h> |
61 | #include <net/scm.h> | 62 | #include <net/scm.h> |
62 | #include <net/netlink.h> | 63 | #include <net/netlink.h> |
@@ -1927,7 +1928,7 @@ static int __init netlink_proto_init(void) | |||
1927 | 1928 | ||
1928 | sock_register(&netlink_family_ops); | 1929 | sock_register(&netlink_family_ops); |
1929 | #ifdef CONFIG_PROC_FS | 1930 | #ifdef CONFIG_PROC_FS |
1930 | proc_net_fops_create("netlink", 0, &netlink_seq_fops); | 1931 | proc_net_fops_create(&init_net, "netlink", 0, &netlink_seq_fops); |
1931 | #endif | 1932 | #endif |
1932 | /* The netlink device handler may be needed early. */ | 1933 | /* The netlink device handler may be needed early. */ |
1933 | rtnetlink_init(); | 1934 | rtnetlink_init(); |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index dc9273295a38..15c8a92bd719 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/netdevice.h> | 27 | #include <linux/netdevice.h> |
28 | #include <linux/if_arp.h> | 28 | #include <linux/if_arp.h> |
29 | #include <linux/skbuff.h> | 29 | #include <linux/skbuff.h> |
30 | #include <net/net_namespace.h> | ||
30 | #include <net/sock.h> | 31 | #include <net/sock.h> |
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
32 | #include <asm/system.h> | 33 | #include <asm/system.h> |
@@ -1447,9 +1448,9 @@ static int __init nr_proto_init(void) | |||
1447 | 1448 | ||
1448 | nr_loopback_init(); | 1449 | nr_loopback_init(); |
1449 | 1450 | ||
1450 | proc_net_fops_create("nr", S_IRUGO, &nr_info_fops); | 1451 | proc_net_fops_create(&init_net, "nr", S_IRUGO, &nr_info_fops); |
1451 | proc_net_fops_create("nr_neigh", S_IRUGO, &nr_neigh_fops); | 1452 | proc_net_fops_create(&init_net, "nr_neigh", S_IRUGO, &nr_neigh_fops); |
1452 | proc_net_fops_create("nr_nodes", S_IRUGO, &nr_nodes_fops); | 1453 | proc_net_fops_create(&init_net, "nr_nodes", S_IRUGO, &nr_nodes_fops); |
1453 | out: | 1454 | out: |
1454 | return rc; | 1455 | return rc; |
1455 | fail: | 1456 | fail: |
@@ -1477,9 +1478,9 @@ static void __exit nr_exit(void) | |||
1477 | { | 1478 | { |
1478 | int i; | 1479 | int i; |
1479 | 1480 | ||
1480 | proc_net_remove("nr"); | 1481 | proc_net_remove(&init_net, "nr"); |
1481 | proc_net_remove("nr_neigh"); | 1482 | proc_net_remove(&init_net, "nr_neigh"); |
1482 | proc_net_remove("nr_nodes"); | 1483 | proc_net_remove(&init_net, "nr_nodes"); |
1483 | nr_loopback_clear(); | 1484 | nr_loopback_clear(); |
1484 | 1485 | ||
1485 | nr_rt_free(); | 1486 | nr_rt_free(); |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 9c26dd9ee649..56502292f24c 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/wireless.h> | 61 | #include <linux/wireless.h> |
62 | #include <linux/kernel.h> | 62 | #include <linux/kernel.h> |
63 | #include <linux/kmod.h> | 63 | #include <linux/kmod.h> |
64 | #include <net/net_namespace.h> | ||
64 | #include <net/ip.h> | 65 | #include <net/ip.h> |
65 | #include <net/protocol.h> | 66 | #include <net/protocol.h> |
66 | #include <linux/skbuff.h> | 67 | #include <linux/skbuff.h> |
@@ -1951,7 +1952,7 @@ static const struct file_operations packet_seq_fops = { | |||
1951 | 1952 | ||
1952 | static void __exit packet_exit(void) | 1953 | static void __exit packet_exit(void) |
1953 | { | 1954 | { |
1954 | proc_net_remove("packet"); | 1955 | proc_net_remove(&init_net, "packet"); |
1955 | unregister_netdevice_notifier(&packet_netdev_notifier); | 1956 | unregister_netdevice_notifier(&packet_netdev_notifier); |
1956 | sock_unregister(PF_PACKET); | 1957 | sock_unregister(PF_PACKET); |
1957 | proto_unregister(&packet_proto); | 1958 | proto_unregister(&packet_proto); |
@@ -1966,7 +1967,7 @@ static int __init packet_init(void) | |||
1966 | 1967 | ||
1967 | sock_register(&packet_family_ops); | 1968 | sock_register(&packet_family_ops); |
1968 | register_netdevice_notifier(&packet_netdev_notifier); | 1969 | register_netdevice_notifier(&packet_netdev_notifier); |
1969 | proc_net_fops_create("packet", 0, &packet_seq_fops); | 1970 | proc_net_fops_create(&init_net, "packet", 0, &packet_seq_fops); |
1970 | out: | 1971 | out: |
1971 | return rc; | 1972 | return rc; |
1972 | } | 1973 | } |
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 976c3cc86a29..48319f7991ac 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/sockios.h> | 26 | #include <linux/sockios.h> |
27 | #include <linux/net.h> | 27 | #include <linux/net.h> |
28 | #include <linux/stat.h> | 28 | #include <linux/stat.h> |
29 | #include <net/net_namespace.h> | ||
29 | #include <net/ax25.h> | 30 | #include <net/ax25.h> |
30 | #include <linux/inet.h> | 31 | #include <linux/inet.h> |
31 | #include <linux/netdevice.h> | 32 | #include <linux/netdevice.h> |
@@ -1576,10 +1577,10 @@ static int __init rose_proto_init(void) | |||
1576 | 1577 | ||
1577 | rose_add_loopback_neigh(); | 1578 | rose_add_loopback_neigh(); |
1578 | 1579 | ||
1579 | proc_net_fops_create("rose", S_IRUGO, &rose_info_fops); | 1580 | proc_net_fops_create(&init_net, "rose", S_IRUGO, &rose_info_fops); |
1580 | proc_net_fops_create("rose_neigh", S_IRUGO, &rose_neigh_fops); | 1581 | proc_net_fops_create(&init_net, "rose_neigh", S_IRUGO, &rose_neigh_fops); |
1581 | proc_net_fops_create("rose_nodes", S_IRUGO, &rose_nodes_fops); | 1582 | proc_net_fops_create(&init_net, "rose_nodes", S_IRUGO, &rose_nodes_fops); |
1582 | proc_net_fops_create("rose_routes", S_IRUGO, &rose_routes_fops); | 1583 | proc_net_fops_create(&init_net, "rose_routes", S_IRUGO, &rose_routes_fops); |
1583 | out: | 1584 | out: |
1584 | return rc; | 1585 | return rc; |
1585 | fail: | 1586 | fail: |
@@ -1606,10 +1607,10 @@ static void __exit rose_exit(void) | |||
1606 | { | 1607 | { |
1607 | int i; | 1608 | int i; |
1608 | 1609 | ||
1609 | proc_net_remove("rose"); | 1610 | proc_net_remove(&init_net, "rose"); |
1610 | proc_net_remove("rose_neigh"); | 1611 | proc_net_remove(&init_net, "rose_neigh"); |
1611 | proc_net_remove("rose_nodes"); | 1612 | proc_net_remove(&init_net, "rose_nodes"); |
1612 | proc_net_remove("rose_routes"); | 1613 | proc_net_remove(&init_net, "rose_routes"); |
1613 | rose_loopback_clear(); | 1614 | rose_loopback_clear(); |
1614 | 1615 | ||
1615 | rose_rt_free(); | 1616 | rose_rt_free(); |
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index c58fa0d1be26..122d55d992e1 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/poll.h> | 15 | #include <linux/poll.h> |
16 | #include <linux/proc_fs.h> | 16 | #include <linux/proc_fs.h> |
17 | #include <net/net_namespace.h> | ||
17 | #include <net/sock.h> | 18 | #include <net/sock.h> |
18 | #include <net/af_rxrpc.h> | 19 | #include <net/af_rxrpc.h> |
19 | #include "ar-internal.h" | 20 | #include "ar-internal.h" |
@@ -829,8 +830,8 @@ static int __init af_rxrpc_init(void) | |||
829 | } | 830 | } |
830 | 831 | ||
831 | #ifdef CONFIG_PROC_FS | 832 | #ifdef CONFIG_PROC_FS |
832 | proc_net_fops_create("rxrpc_calls", 0, &rxrpc_call_seq_fops); | 833 | proc_net_fops_create(&init_net, "rxrpc_calls", 0, &rxrpc_call_seq_fops); |
833 | proc_net_fops_create("rxrpc_conns", 0, &rxrpc_connection_seq_fops); | 834 | proc_net_fops_create(&init_net, "rxrpc_conns", 0, &rxrpc_connection_seq_fops); |
834 | #endif | 835 | #endif |
835 | return 0; | 836 | return 0; |
836 | 837 | ||
@@ -868,8 +869,8 @@ static void __exit af_rxrpc_exit(void) | |||
868 | 869 | ||
869 | _debug("flush scheduled work"); | 870 | _debug("flush scheduled work"); |
870 | flush_workqueue(rxrpc_workqueue); | 871 | flush_workqueue(rxrpc_workqueue); |
871 | proc_net_remove("rxrpc_conns"); | 872 | proc_net_remove(&init_net, "rxrpc_conns"); |
872 | proc_net_remove("rxrpc_calls"); | 873 | proc_net_remove(&init_net, "rxrpc_calls"); |
873 | destroy_workqueue(rxrpc_workqueue); | 874 | destroy_workqueue(rxrpc_workqueue); |
874 | kmem_cache_destroy(rxrpc_call_jar); | 875 | kmem_cache_destroy(rxrpc_call_jar); |
875 | _leave(""); | 876 | _leave(""); |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index dee0d5fb39c5..efc383c58f1e 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/hrtimer.h> | 29 | #include <linux/hrtimer.h> |
30 | 30 | ||
31 | #include <net/net_namespace.h> | ||
31 | #include <net/netlink.h> | 32 | #include <net/netlink.h> |
32 | #include <net/pkt_sched.h> | 33 | #include <net/pkt_sched.h> |
33 | 34 | ||
@@ -1251,7 +1252,7 @@ static int __init pktsched_init(void) | |||
1251 | { | 1252 | { |
1252 | register_qdisc(&pfifo_qdisc_ops); | 1253 | register_qdisc(&pfifo_qdisc_ops); |
1253 | register_qdisc(&bfifo_qdisc_ops); | 1254 | register_qdisc(&bfifo_qdisc_ops); |
1254 | proc_net_fops_create("psched", 0, &psched_fops); | 1255 | proc_net_fops_create(&init_net, "psched", 0, &psched_fops); |
1255 | 1256 | ||
1256 | rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL); | 1257 | rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL); |
1257 | rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL); | 1258 | rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL); |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 957c118a6068..30929e3ca05a 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/inetdevice.h> | 52 | #include <linux/inetdevice.h> |
53 | #include <linux/seq_file.h> | 53 | #include <linux/seq_file.h> |
54 | #include <linux/bootmem.h> | 54 | #include <linux/bootmem.h> |
55 | #include <net/net_namespace.h> | ||
55 | #include <net/protocol.h> | 56 | #include <net/protocol.h> |
56 | #include <net/ip.h> | 57 | #include <net/ip.h> |
57 | #include <net/ipv6.h> | 58 | #include <net/ipv6.h> |
@@ -98,7 +99,7 @@ static __init int sctp_proc_init(void) | |||
98 | { | 99 | { |
99 | if (!proc_net_sctp) { | 100 | if (!proc_net_sctp) { |
100 | struct proc_dir_entry *ent; | 101 | struct proc_dir_entry *ent; |
101 | ent = proc_mkdir("net/sctp", NULL); | 102 | ent = proc_mkdir("sctp", init_net.proc_net); |
102 | if (ent) { | 103 | if (ent) { |
103 | ent->owner = THIS_MODULE; | 104 | ent->owner = THIS_MODULE; |
104 | proc_net_sctp = ent; | 105 | proc_net_sctp = ent; |
@@ -131,7 +132,7 @@ static void sctp_proc_exit(void) | |||
131 | 132 | ||
132 | if (proc_net_sctp) { | 133 | if (proc_net_sctp) { |
133 | proc_net_sctp = NULL; | 134 | proc_net_sctp = NULL; |
134 | remove_proc_entry("net/sctp", NULL); | 135 | remove_proc_entry("sctp", init_net.proc_net); |
135 | } | 136 | } |
136 | } | 137 | } |
137 | 138 | ||
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index 74ba7d443dfc..4d4f3738b688 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/sunrpc/clnt.h> | 21 | #include <linux/sunrpc/clnt.h> |
22 | #include <linux/sunrpc/svcsock.h> | 22 | #include <linux/sunrpc/svcsock.h> |
23 | #include <linux/sunrpc/metrics.h> | 23 | #include <linux/sunrpc/metrics.h> |
24 | #include <net/net_namespace.h> | ||
24 | 25 | ||
25 | #define RPCDBG_FACILITY RPCDBG_MISC | 26 | #define RPCDBG_FACILITY RPCDBG_MISC |
26 | 27 | ||
@@ -265,7 +266,7 @@ rpc_proc_init(void) | |||
265 | dprintk("RPC: registering /proc/net/rpc\n"); | 266 | dprintk("RPC: registering /proc/net/rpc\n"); |
266 | if (!proc_net_rpc) { | 267 | if (!proc_net_rpc) { |
267 | struct proc_dir_entry *ent; | 268 | struct proc_dir_entry *ent; |
268 | ent = proc_mkdir("rpc", proc_net); | 269 | ent = proc_mkdir("rpc", init_net.proc_net); |
269 | if (ent) { | 270 | if (ent) { |
270 | ent->owner = THIS_MODULE; | 271 | ent->owner = THIS_MODULE; |
271 | proc_net_rpc = ent; | 272 | proc_net_rpc = ent; |
@@ -279,7 +280,7 @@ rpc_proc_exit(void) | |||
279 | dprintk("RPC: unregistering /proc/net/rpc\n"); | 280 | dprintk("RPC: unregistering /proc/net/rpc\n"); |
280 | if (proc_net_rpc) { | 281 | if (proc_net_rpc) { |
281 | proc_net_rpc = NULL; | 282 | proc_net_rpc = NULL; |
282 | remove_proc_entry("net/rpc", NULL); | 283 | remove_proc_entry("rpc", init_net.proc_net); |
283 | } | 284 | } |
284 | } | 285 | } |
285 | 286 | ||
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index a05c34260e70..2386090c3a16 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -103,6 +103,7 @@ | |||
103 | #include <asm/uaccess.h> | 103 | #include <asm/uaccess.h> |
104 | #include <linux/skbuff.h> | 104 | #include <linux/skbuff.h> |
105 | #include <linux/netdevice.h> | 105 | #include <linux/netdevice.h> |
106 | #include <net/net_namespace.h> | ||
106 | #include <net/sock.h> | 107 | #include <net/sock.h> |
107 | #include <net/tcp_states.h> | 108 | #include <net/tcp_states.h> |
108 | #include <net/af_unix.h> | 109 | #include <net/af_unix.h> |
@@ -2135,7 +2136,7 @@ static int __init af_unix_init(void) | |||
2135 | 2136 | ||
2136 | sock_register(&unix_family_ops); | 2137 | sock_register(&unix_family_ops); |
2137 | #ifdef CONFIG_PROC_FS | 2138 | #ifdef CONFIG_PROC_FS |
2138 | proc_net_fops_create("unix", 0, &unix_seq_fops); | 2139 | proc_net_fops_create(&init_net, "unix", 0, &unix_seq_fops); |
2139 | #endif | 2140 | #endif |
2140 | unix_sysctl_register(); | 2141 | unix_sysctl_register(); |
2141 | out: | 2142 | out: |
@@ -2146,7 +2147,7 @@ static void __exit af_unix_exit(void) | |||
2146 | { | 2147 | { |
2147 | sock_unregister(PF_UNIX); | 2148 | sock_unregister(PF_UNIX); |
2148 | unix_sysctl_unregister(); | 2149 | unix_sysctl_unregister(); |
2149 | proc_net_remove("unix"); | 2150 | proc_net_remove(&init_net, "unix"); |
2150 | proto_unregister(&unix_proto); | 2151 | proto_unregister(&unix_proto); |
2151 | } | 2152 | } |
2152 | 2153 | ||
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index 236e7eaf1b7f..f2e54c3f064e 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
30 | #include <linux/smp_lock.h> | 30 | #include <linux/smp_lock.h> |
31 | 31 | ||
32 | #include <net/net_namespace.h> | ||
32 | #include <asm/io.h> | 33 | #include <asm/io.h> |
33 | 34 | ||
34 | #define PROC_STATS_FORMAT "%30s: %12lu\n" | 35 | #define PROC_STATS_FORMAT "%30s: %12lu\n" |
@@ -287,7 +288,7 @@ static const struct file_operations wandev_fops = { | |||
287 | int __init wanrouter_proc_init(void) | 288 | int __init wanrouter_proc_init(void) |
288 | { | 289 | { |
289 | struct proc_dir_entry *p; | 290 | struct proc_dir_entry *p; |
290 | proc_router = proc_mkdir(ROUTER_NAME, proc_net); | 291 | proc_router = proc_mkdir(ROUTER_NAME, init_net.proc_net); |
291 | if (!proc_router) | 292 | if (!proc_router) |
292 | goto fail; | 293 | goto fail; |
293 | 294 | ||
@@ -303,7 +304,7 @@ int __init wanrouter_proc_init(void) | |||
303 | fail_stat: | 304 | fail_stat: |
304 | remove_proc_entry("config", proc_router); | 305 | remove_proc_entry("config", proc_router); |
305 | fail_config: | 306 | fail_config: |
306 | remove_proc_entry(ROUTER_NAME, proc_net); | 307 | remove_proc_entry(ROUTER_NAME, init_net.proc_net); |
307 | fail: | 308 | fail: |
308 | return -ENOMEM; | 309 | return -ENOMEM; |
309 | } | 310 | } |
@@ -316,7 +317,7 @@ void wanrouter_proc_cleanup(void) | |||
316 | { | 317 | { |
317 | remove_proc_entry("config", proc_router); | 318 | remove_proc_entry("config", proc_router); |
318 | remove_proc_entry("status", proc_router); | 319 | remove_proc_entry("status", proc_router); |
319 | remove_proc_entry(ROUTER_NAME, proc_net); | 320 | remove_proc_entry(ROUTER_NAME, init_net.proc_net); |
320 | } | 321 | } |
321 | 322 | ||
322 | /* | 323 | /* |
diff --git a/net/wireless/wext.c b/net/wireless/wext.c index debf5191a128..b8069afe0410 100644 --- a/net/wireless/wext.c +++ b/net/wireless/wext.c | |||
@@ -93,6 +93,7 @@ | |||
93 | #include <linux/if_arp.h> /* ARPHRD_ETHER */ | 93 | #include <linux/if_arp.h> /* ARPHRD_ETHER */ |
94 | #include <linux/etherdevice.h> /* compare_ether_addr */ | 94 | #include <linux/etherdevice.h> /* compare_ether_addr */ |
95 | #include <linux/interrupt.h> | 95 | #include <linux/interrupt.h> |
96 | #include <net/net_namespace.h> | ||
96 | 97 | ||
97 | #include <linux/wireless.h> /* Pretty obvious */ | 98 | #include <linux/wireless.h> /* Pretty obvious */ |
98 | #include <net/iw_handler.h> /* New driver API */ | 99 | #include <net/iw_handler.h> /* New driver API */ |
@@ -686,7 +687,7 @@ static const struct file_operations wireless_seq_fops = { | |||
686 | int __init wext_proc_init(void) | 687 | int __init wext_proc_init(void) |
687 | { | 688 | { |
688 | /* Create /proc/net/wireless entry */ | 689 | /* Create /proc/net/wireless entry */ |
689 | if (!proc_net_fops_create("wireless", S_IRUGO, &wireless_seq_fops)) | 690 | if (!proc_net_fops_create(&init_net, "wireless", S_IRUGO, &wireless_seq_fops)) |
690 | return -ENOMEM; | 691 | return -ENOMEM; |
691 | 692 | ||
692 | return 0; | 693 | return 0; |
diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c index 7405b9c5b7f2..7d55e50c936f 100644 --- a/net/x25/x25_proc.c +++ b/net/x25/x25_proc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <net/net_namespace.h> | ||
23 | #include <net/sock.h> | 24 | #include <net/sock.h> |
24 | #include <net/x25.h> | 25 | #include <net/x25.h> |
25 | 26 | ||
@@ -301,7 +302,7 @@ int __init x25_proc_init(void) | |||
301 | struct proc_dir_entry *p; | 302 | struct proc_dir_entry *p; |
302 | int rc = -ENOMEM; | 303 | int rc = -ENOMEM; |
303 | 304 | ||
304 | x25_proc_dir = proc_mkdir("x25", proc_net); | 305 | x25_proc_dir = proc_mkdir("x25", init_net.proc_net); |
305 | if (!x25_proc_dir) | 306 | if (!x25_proc_dir) |
306 | goto out; | 307 | goto out; |
307 | 308 | ||
@@ -328,7 +329,7 @@ out_forward: | |||
328 | out_socket: | 329 | out_socket: |
329 | remove_proc_entry("route", x25_proc_dir); | 330 | remove_proc_entry("route", x25_proc_dir); |
330 | out_route: | 331 | out_route: |
331 | remove_proc_entry("x25", proc_net); | 332 | remove_proc_entry("x25", init_net.proc_net); |
332 | goto out; | 333 | goto out; |
333 | } | 334 | } |
334 | 335 | ||
@@ -337,7 +338,7 @@ void __exit x25_proc_exit(void) | |||
337 | remove_proc_entry("forward", x25_proc_dir); | 338 | remove_proc_entry("forward", x25_proc_dir); |
338 | remove_proc_entry("route", x25_proc_dir); | 339 | remove_proc_entry("route", x25_proc_dir); |
339 | remove_proc_entry("socket", x25_proc_dir); | 340 | remove_proc_entry("socket", x25_proc_dir); |
340 | remove_proc_entry("x25", proc_net); | 341 | remove_proc_entry("x25", init_net.proc_net); |
341 | } | 342 | } |
342 | 343 | ||
343 | #else /* CONFIG_PROC_FS */ | 344 | #else /* CONFIG_PROC_FS */ |