* [PATCH] mm/slab.c: check kmalloc() return value.
@ 2007-03-09 7:20 Amit Choudhary
0 siblings, 0 replies; only message in thread
From: Amit Choudhary @ 2007-03-09 7:20 UTC (permalink / raw)
To: Linux Kernel
Description: Check the return value of kmalloc() in function setup_cpu_cache(), in file mm/slab.c.
Signed-off-by: Amit Choudhary <amit2030@gmail.com>
diff --git a/mm/slab.c b/mm/slab.c
index 84c631f..613ae61 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2021,6 +2021,7 @@ static int setup_cpu_cache(struct kmem_c
} else {
cachep->array[smp_processor_id()] =
kmalloc(sizeof(struct arraycache_init), GFP_KERNEL);
+ BUG_ON(!cachep->array[smp_processor_id()]);
if (g_cpucache_up == PARTIAL_AC) {
set_up_list3s(cachep, SIZE_L3);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-09 7:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-09 7:20 [PATCH] mm/slab.c: check kmalloc() return value Amit Choudhary
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox