aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-10-27 01:54:53 -0400
committerDavid S. Miller <davem@davemloft.net>2007-10-27 01:54:53 -0400
commit2b008b0a8e96b726c603c5e1a5a7a509b5f61e35 (patch)
tree80d71a763d3e8365805203cf22093783e64e1bbc /fs
parent72998d8c84247817c4b8b05b0256f29453e435f5 (diff)
[NET]: Marking struct pernet_operations __net_initdata was inappropriate
It is not safe to to place struct pernet_operations in a special section. We need struct pernet_operations to last until we call unregister_pernet_subsys. Which doesn't happen until module unload. So marking struct pernet_operations is a disaster for modules in two ways. - We discard it before we call the exit method it points to. - Because I keep struct pernet_operations on a linked list discarding it for compiled in code removes elements in the middle of a linked list and does horrible things for linked insert. So this looks safe assuming __exit_refok is not discarded for modules. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/proc_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index 4edaad0d995f..749def054a34 100644
--- a/fs/proc/proc_net.c
+++ b/fs/proc/proc_net.c
@@ -185,7 +185,7 @@ static __net_exit void proc_net_ns_exit(struct net *net)
185 kfree(net->proc_net_root); 185 kfree(net->proc_net_root);
186} 186}
187 187
188static struct pernet_operations __net_initdata proc_net_ns_ops = { 188static struct pernet_operations proc_net_ns_ops = {
189 .init = proc_net_ns_init, 189 .init = proc_net_ns_init,
190 .exit = proc_net_ns_exit, 190 .exit = proc_net_ns_exit,
191}; 191};