netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@free.fr>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Pavel Emelyanov <xemul@openvz.org>,
	davem@davemloft.net, kaber@trash.net, netdev@vger.kernel.org,
	linux-next@vger.kernel.org, adobriyan@gmail.com,
	Cyrill Gorcunov <gorcunov@openvz.org>
Subject: Re: [RFC 2/4] net: netfilter conntrack - add per-net functionality for DCCP protocol
Date: Tue, 10 Mar 2009 13:43:45 +0100	[thread overview]
Message-ID: <49B66081.7010702@free.fr> (raw)
In-Reply-To: <aa79d98a0903100451r6179ca61l3573cd8ae6e171b7@mail.gmail.com>

Cyrill Gorcunov wrote:
> On Tue, Mar 10, 2009 at 2:35 PM, Pavel Emelyanov <xemul@openvz.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

  parent reply	other threads:[~2009-03-10 12:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09 18:16 [RFC 0/4] netfilter conntrack sysctls pernet support Cyrill Gorcunov
2009-03-09 18:16 ` [RFC 1/4] net: sysctl_net - use net_eq to compare nets Cyrill Gorcunov
2009-03-09 18:16 ` [RFC 2/4] net: netfilter conntrack - add per-net functionality for DCCP protocol Cyrill Gorcunov
     [not found]   ` <49B63EA6.2060802@free.fr>
2009-03-10 10:33     ` Daniel Lezcano
2009-03-10 10:59       ` Cyrill Gorcunov
2009-03-10 11:35         ` Pavel Emelyanov
2009-03-10 11:51           ` Cyrill Gorcunov
2009-03-10 11:56             ` Pavel Emelyanov
2009-03-10 12:43             ` Daniel Lezcano [this message]
2009-03-10 11:25     ` David Miller
2009-03-10 13:02       ` Daniel Lezcano
2009-03-09 18:16 ` [RFC 3/4] net: netfilter conntrack - add per-net functionality for SCTP protocol Cyrill Gorcunov
2009-03-10 10:21   ` Daniel Lezcano
2009-03-09 18:16 ` [RFC 4/4] net: netfilter conntrack - add per-net functionality for UDPLITE protocol Cyrill Gorcunov
2009-03-09 18:47 ` [RFC 0/4] netfilter conntrack sysctls pernet support Patrick McHardy
2009-03-09 19:07   ` Cyrill Gorcunov
2009-03-09 21:08     ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B66081.7010702@free.fr \
    --to=daniel.lezcano@free.fr \
    --cc=adobriyan@gmail.com \
    --cc=davem@davemloft.net \
    --cc=gorcunov@gmail.com \
    --cc=gorcunov@openvz.org \
    --cc=kaber@trash.net \
    --cc=linux-next@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).