public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: linux-media@vger.kernel.org
Subject: Re: [git:v4l-dvb/master] af_key: fix netns ops ordering on module load/unload
Date: Sun, 7 Mar 2010 00:46:33 +0200	[thread overview]
Message-ID: <20100306224633.GA4005@x200> (raw)
In-Reply-To: <E1NnuyA-0001Am-Cv@www.linuxtv.org>

On Sat, Mar 06, 2010 at 03:27:06PM +0100, Patch from Alexey Dobriyan wrote:
> From: Alexey Dobriyan <adobriyan@gmail.com>
> 
> 1. After sock_register() returns, it's possible to create sockets,
>    even if module still not initialized fully (blame generic module code
>    for that!)
> 2. Consequently, pfkey_create() can be called with pfkey_net_id still not
>    initialized which will BUG_ON in net_generic():
> 	kernel BUG at include/net/netns/generic.h:43!
> 3. During netns shutdown, netns ops should be unregistered after
>    key manager unregistered because key manager calls can be triggered
>    from xfrm_user module:
> 
>    	general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
> 	pfkey_broadcast+0x111/0x210 [af_key]
> 	pfkey_send_notify+0x16a/0x300 [af_key]
> 	km_state_notify+0x41/0x70
> 	xfrm_flush_sa+0x75/0x90 [xfrm_user]
> 4. Unregister netns ops after socket ops just in case and for symmetry.
> 
> Reported by Luca Tettamanti.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> Tested-by: Luca Tettamanti <kronos.it@gmail.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>

What this has to do with DVB?

           reply	other threads:[~2010-03-06 22:46 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <E1NnuyA-0001Am-Cv@www.linuxtv.org>]

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=20100306224633.GA4005@x200 \
    --to=adobriyan@gmail.com \
    --cc=linux-media@vger.kernel.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