Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	LKML <linux-kernel@vger.kernel.org>,
	Christoph Lameter <cl@linux-foundation.org>,
	Pekka Enberg <penberg@kernel.org>,
	netdev@vger.kernel.org
Subject: Re: Regression in 3.8-rc1:  "BUG: sleeping function called from invalid context"
Date: Sat, 22 Dec 2012 10:10:28 -0800	[thread overview]
Message-ID: <1356199828.21834.8500.camel@edumazet-glaptop> (raw)
In-Reply-To: <20121222180247.GA10250@liondog.tnic>

On Sat, 2012-12-22 at 19:02 +0100, Borislav Petkov wrote:
> Top-posting so that the rest can remain untouched.
> 
> Right, so AFAICT, something is holding rtnl_mutex (probably some
> rtnetlink traffic) and device_rename() is doing kstrdup with
> GFP_KERNEL which, among others, has __GFP_WAIT and *that* triggers the
> might_sleep_if() check in slab_pre_alloc_hook():
> 
> static inline int slab_pre_alloc_hook(struct kmem_cache *s, gfp_t flags)
> {
>         flags &= gfp_allowed_mask;
>         lockdep_trace_alloc(flags);
>         might_sleep_if(flags & __GFP_WAIT);		<--- HERE
> 
> Adding Christoph and Pekka although the slub.c might_sleep stuff is from
> 2010. Still, they might have a better idea.
> 
> Oh well, let's add netdev while we're at it. :-)

RTNL is a mutex, its perfectly valid to use GFP_KERNEL while holding a
mutex.

As replied before your mail, fix for the problem is already in David
tree.

http://git.kernel.org/?p=linux/kernel/git/davem/net.git;a=commitdiff;h=30e6c9fa93cf3dbc7cc6df1d748ad25e4264545a


Bug was added in commit c91f6df2db4972d3cc983e6988b9abf1ad02f5f9 :

http://git.kernel.org/?p=linux/kernel/git/davem/net.git;a=commit;h=c91f6df2db4972d3cc983e6988b9abf1ad02f5f9


Thanks

  reply	other threads:[~2012-12-22 18:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50D5E9D9.3070904@lwfinger.net>
2012-12-22 18:02 ` Regression in 3.8-rc1: "BUG: sleeping function called from invalid context" Borislav Petkov
2012-12-22 18:10   ` Eric Dumazet [this message]
2012-12-22 18:30     ` Borislav Petkov
2012-12-22 19:04       ` Larry Finger
2012-12-22 21:34   ` David Miller

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=1356199828.21834.8500.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=bp@alien8.de \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=penberg@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