* [PATCH 2/2] nf_conntrack_proto_gre: switch to register_pernet_gen_subsys()
@ 2008-10-25 22:51 Alexey Dobriyan
2008-10-28 12:10 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2008-10-25 22:51 UTC (permalink / raw)
To: davem, kaber; +Cc: netdev, netfiter-devel, containters
register_pernet_gen_device() can't be used is nf_conntrack_pptp module is
also used (compiled in or loaded).
Right now, proto_gre_net_exit() is called before nf_conntrack_pptp_net_exit().
The former shutdowns and frees GRE piece of netns, however the latter
absolutely needs it to flush keymap. Oops is inevitable.
Switch to shiny new register_pernet_gen_subsys() to get correct ordering in
netns ops list.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
net/netfilter/nf_conntrack_proto_gre.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/netfilter/nf_conntrack_proto_gre.c
+++ b/net/netfilter/nf_conntrack_proto_gre.c
@@ -335,7 +335,7 @@ static int __init nf_ct_proto_gre_init(void)
rv = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_gre4);
if (rv < 0)
return rv;
- rv = register_pernet_gen_device(&proto_gre_net_id, &proto_gre_net_ops);
+ rv = register_pernet_gen_subsys(&proto_gre_net_id, &proto_gre_net_ops);
if (rv < 0)
nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_gre4);
return rv;
@@ -344,7 +344,7 @@ static int __init nf_ct_proto_gre_init(void)
static void nf_ct_proto_gre_fini(void)
{
nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_gre4);
- unregister_pernet_gen_device(proto_gre_net_id, &proto_gre_net_ops);
+ unregister_pernet_gen_subsys(proto_gre_net_id, &proto_gre_net_ops);
}
module_init(nf_ct_proto_gre_init);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] nf_conntrack_proto_gre: switch to register_pernet_gen_subsys()
2008-10-25 22:51 [PATCH 2/2] nf_conntrack_proto_gre: switch to register_pernet_gen_subsys() Alexey Dobriyan
@ 2008-10-28 12:10 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2008-10-28 12:10 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: davem, netdev, netfiter-devel, containters
Alexey Dobriyan wrote:
> register_pernet_gen_device() can't be used is nf_conntrack_pptp module is
> also used (compiled in or loaded).
>
> Right now, proto_gre_net_exit() is called before nf_conntrack_pptp_net_exit().
> The former shutdowns and frees GRE piece of netns, however the latter
> absolutely needs it to flush keymap. Oops is inevitable.
>
> Switch to shiny new register_pernet_gen_subsys() to get correct ordering in
> netns ops list.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-28 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-25 22:51 [PATCH 2/2] nf_conntrack_proto_gre: switch to register_pernet_gen_subsys() Alexey Dobriyan
2008-10-28 12:10 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).