[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070330164104.GA10173@cvg>
Date: Fri, 30 Mar 2007 20:41:04 +0400
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Pekka Enberg <penberg@...helsinki.fi>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>,
Cyrill Gorcunov <gorcunov@...il.com>,
linux-kernel-list <linux-kernel@...r.kernel.org>
Subject: Re: [QUESTION] check for mem in slab
[Pekka Enberg - Fri, Mar 30, 2007 at 02:55:26PM +0300]
| On 3/30/07, Heiko Carstens <heiko.carstens@...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.
|
Thanks for answer
Cyrill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists