public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: mroos@linux.ee, David Miller <davem@davemloft.net>,
	sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: slab hang on boot
Date: Tue, 15 May 2007 16:33:21 -0700	[thread overview]
Message-ID: <20070515163321.744e2388.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0705141642350.13606@schroedinger.engr.sgi.com>

On Mon, 14 May 2007 16:46:17 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> @@ -86,6 +87,9 @@ static inline int kmalloc_index(int size
>  	 */
>  	WARN_ON_ONCE(size == 0);
>  
> +	if (size >= (1UL << KMALLOC_SHIFT_HIGH))
> +		return -1;
> +

I don't quite understand why we did this.  The subsequent logic in
kmalloc_index() should return -1 for this `size' anyway.  If it doesn't,
it's bust, isn't it?

Also, afaict kmalloc_slab() will totally mishandle the -1 return value and
will return a garbage kmem_cache*, via

        return &kmalloc_caches[index];


Could you double-check it all please?

  parent reply	other threads:[~2007-05-15 23:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.SOC.4.64.0705142133190.17204@math>
2007-05-14 22:11 ` slab hang on boot David Miller
2007-05-14 23:46   ` Christoph Lameter
2007-05-15  0:15     ` Andrew Morton
2007-05-15 23:33     ` Andrew Morton [this message]
2007-05-15 23:45       ` Christoph Lameter
2007-05-15 23:56         ` Andrew Morton
2007-05-16  0:14           ` David Miller
2007-05-16  0:29             ` Andrew Morton
2007-05-16  0:38               ` David Miller
2007-05-16  1:00                 ` Christoph Lameter
2007-05-16  1:03                   ` David Miller
2007-05-16  6:43                     ` David Miller
2007-05-16  0:51               ` Christoph Lameter
2007-05-16  0:50           ` Christoph Lameter

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=20070515163321.744e2388.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    --cc=sparclinux@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