All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@parallels.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@linux.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Tetsuo Handa" <penguin-kernel@i-love.sakura.ne.jp>
Subject: Re: [GIT PULL] SLAB changes for v3.10
Date: Wed, 8 May 2013 16:38:37 +0400	[thread overview]
Message-ID: <518A474D.9010801@parallels.com> (raw)
In-Reply-To: <CAOJsxLEjqNA1wbZta568McFnEb_nbnGF1_9kEhOJkFTX-CobaA@mail.gmail.com>

On 05/08/2013 04:26 PM, Pekka Enberg wrote:
> On Wed, May 8, 2013 at 2:58 PM, Glauber Costa <glommer@parallels.com> wrote:
>> My first guess is that it hit a NULL cache. Being a NULL pointer
>> dereference, the thing among all that has the biggest chances of being
>> NULL and accessed unconditionally is the cache pointer itself.
>>
>> Due to the size being too big. But if that were the case, he would have
>> hit the WARN_ON recently introduced:
>>
>>                 if (WARN_ON_ONCE(size > KMALLOC_MAX_SIZE))
>>                         return NULL;
>>
>>
>> Is this WARN hit ?
> 
> I doubt it:
> 
> [    0.000000] r7 : 00000000  r6 : 600001d3  r5 : 00000000  r4 : 00008000
> [    0.000000] r3 : 00000050  r2 : c06ec000  r1 : c06f77c8  r0 : c00eda9c
> 
> [    0.000000] [<c00edab4>] (kmem_cache_alloc_trace+0x50/0x178) from
> [<c0086958>] (alloc_desc+0x24/0xb4)
> 
> It's the kzalloc_node() in kernel/irq/irqdesc.c::alloc_desc() and
> AFAICT based on r4 it's a 32 KB allocation. It's more likely that
> KMALLOC_SHIFT_HIGH is less than 25 and because kmalloc_index() doesn't
> respect it, we return a pointer to an uninitialized kmalloc cache.
> 

Exactly, but then the index is calculated from the size. If we are
allocating with a size that would lead to an invalid index, we should
WARN. If this is not happening, that WARN is really really badly placed.



  reply	other threads:[~2013-05-08 12:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07  6:37 [GIT PULL] SLAB changes for v3.10 Pekka Enberg
2013-05-08  0:30 ` Tony Lindgren
2013-05-08  4:24   ` Tony Lindgren
2013-05-08  5:16     ` Tony Lindgren
2013-05-08  6:20       ` Pekka Enberg
2013-05-08 11:58         ` Glauber Costa
2013-05-08 12:26           ` Pekka Enberg
2013-05-08 12:38             ` Glauber Costa [this message]
2013-05-08 13:56     ` Christoph Lameter
2013-05-08 15:45       ` Tony Lindgren
     [not found]         ` <alpine.DEB.2.02.1305081309310.3124@gentwo.org>
2013-05-08 18:29           ` Christoph Lameter
2013-05-08 18:13     ` Chris Mason
2013-05-08 18:25       ` Christoph Lameter
2013-05-08 18:48         ` Chris Mason
2013-05-08 19:01           ` Christoph Lameter
2013-05-08 19:11             ` Tony Lindgren
2013-05-08 19:56             ` [PATCH] Fix crash during slab init Chris Mason
2013-05-08 20:10               ` Sören Brinkmann
2013-05-08 21:48               ` Tetsuo Handa
2013-05-08 22:09               ` Andrew Morton
2013-05-08 19:05         ` [GIT PULL] SLAB changes for v3.10 Tony Lindgren
2013-05-08 21:01       ` Konrad Rzeszutek Wilk

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=518A474D.9010801@parallels.com \
    --to=glommer@parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=tony@atomide.com \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.