mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: "Heiko Carstens" <heiko.carstens@de.ibm.com>
Cc: "Cyrill Gorcunov" <gorcunov@gmail.com>,
	linux-kernel-list <linux-kernel@vger.kernel.org>
Subject: Re: [QUESTION] check for mem in slab
Date: Fri, 30 Mar 2007 14:55:26 +0300	[thread overview]
Message-ID: <84144f020703300455i4fe6bdc5yf4389c2105487bb0@mail.gmail.com> (raw)
In-Reply-To: <20070330065641.GA8365@osiris.boeblingen.de.ibm.com>

On 3/30/07, Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> > in file mm/slab.c and routine kmem_cache_init() I found there
> > is no checking for allocated memory on line:
> >
> >       /* 4) Replace the bootstrap head arrays */
> >       {
> >               struct array_cache *ptr;
> >
> >               ptr = kmalloc(sizeof(struct arraycache_init), GFP_KERNEL);
> >
> > --> no check for ptr == NULL <--
> [...]
> > is that OK? or it's a bug?
>
> It's ok. If that allocation fails your machine won't come up anyway.

We ought to add a BUG_ON or comment at least there as this keeps
popping up again and again.

  reply	other threads:[~2007-03-30 11:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-29 16:04 Cyrill Gorcunov
2007-03-30  6:56 ` Heiko Carstens
2007-03-30 11:55   ` Pekka Enberg [this message]
2007-03-30 16:41     ` Cyrill Gorcunov
2007-04-02  9:50     ` [PATCH] Catch kmalloc failure in kmem_cache_init() (was: [QUESTION] check for mem in slab) Johannes Weiner
2007-04-02 10:18 ` [PATCH] Catch kmalloc() failure in kmem_cache_init() Johannes Weiner
2007-04-02 10:23   ` Pekka J Enberg

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=84144f020703300455i4fe6bdc5yf4389c2105487bb0@mail.gmail.com \
    --to=penberg@cs.helsinki.fi \
    --cc=gorcunov@gmail.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®