aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
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 /include/net
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 'include/net')
-rw-r--r--include/net/net_namespace.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 93aa87d32804..5279466606d2 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -102,11 +102,9 @@ static inline void release_net(struct net *net)
102#ifdef CONFIG_NET_NS 102#ifdef CONFIG_NET_NS
103#define __net_init 103#define __net_init
104#define __net_exit 104#define __net_exit
105#define __net_initdata
106#else 105#else
107#define __net_init __init 106#define __net_init __init
108#define __net_exit __exit_refok 107#define __net_exit __exit_refok
109#define __net_initdata __initdata
110#endif 108#endif
111 109
112struct pernet_operations { 110struct pernet_operations {