diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-10-27 07:54:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-10-27 07:54:53 +0200 |
commit | 2b008b0a8e96b726c603c5e1a5a7a509b5f61e35 (patch) | |
tree | 80d71a763d3e8365805203cf22093783e64e1bbc /net/netlink | |
parent | [INET] ESP: Must #include <linux/scatterlist.h> (diff) | |
download | linux-2b008b0a8e96b726c603c5e1a5a7a509b5f61e35.tar.xz linux-2b008b0a8e96b726c603c5e1a5a7a509b5f61e35.zip |
[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 'net/netlink')
-rw-r--r-- | net/netlink/af_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 325272925d0f..4f994c0fb3f8 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1888,7 +1888,7 @@ static void __net_exit netlink_net_exit(struct net *net) #endif } -static struct pernet_operations __net_initdata netlink_net_ops = { +static struct pernet_operations netlink_net_ops = { .init = netlink_net_init, .exit = netlink_net_exit, }; |