[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49B66081.7010702@free.fr>
Date: Tue, 10 Mar 2009 13:43:45 +0100
From: Daniel Lezcano <daniel.lezcano@...e.fr>
To: Cyrill Gorcunov <gorcunov@...il.com>
CC: Pavel Emelyanov <xemul@...nvz.org>, davem@...emloft.net,
kaber@...sh.net, netdev@...r.kernel.org,
linux-next@...r.kernel.org, adobriyan@...il.com,
Cyrill Gorcunov <gorcunov@...nvz.org>
Subject: Re: [RFC 2/4] net: netfilter conntrack - add per-net functionality
for DCCP protocol
Cyrill Gorcunov wrote:
> On Tue, Mar 10, 2009 at 2:35 PM, Pavel Emelyanov <xemul@...nvz.org> wrote:
> ...
>
>>>>>> static int __init nf_conntrack_proto_dccp_init(void)
>>>>>> {
>>>>>> int err;
>>>>>> - err = nf_conntrack_l4proto_register(&dccp_proto4);
>>>>>> + err = register_pernet_gen_device(&dccp_net_id, &dccp_net_ops);
>>>>>>
>>>>>>
>>>> [ cut ]
>>>>
>>>>> Shouldn't it be register_pernet_gen_subsys ?
>>>>>
>>> No, I believe. By using register_pernet_gen_device I'm allowed to
>>> not modify 'struct net' and friends and keep all I need in my own
>>> pointer retrieved thru per-net gen-device id I've registered.
>>>
>> I believe Daniel means, that we need the register_xxx_get_subsys call
>> for subsystems, rather than devices, that will behave according to the
>> generic net pointers.
>>
>> Daniel, am I right with this suggestion?
>>
>>
Correct, otherwise that can lead to a kernel panic if you receive a
packet while the namespace is exiting.
> ...
> Ah, yes, just checked register_pernet_gen_subsys -- it's what I need. Thanks!
>
You are welcome :)
-- Daniel
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists