]> git.hungrycats.org Git - linux/commitdiff
[PATCH] slab: print slab name in kmem_cache_init()
authorAndrew Morton <akpm@osdl.org>
Thu, 19 Feb 2004 00:37:12 +0000 (16:37 -0800)
committerDavid S. Miller <davem@nuts.davemloft.net>
Thu, 19 Feb 2004 00:37:12 +0000 (16:37 -0800)
Print the name of the offending slab if we're going to go BUG in
kmem_cache_init().

mm/slab.c

index dba89fa55ca195a68cd6689e04ba7802e75b8399..435e5a15fc51fcaf8632f78320acb065a07acf21 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1041,8 +1041,11 @@ kmem_cache_create (const char *name, size_t size, size_t offset,
                (size < BYTES_PER_WORD) ||
                (size > (1<<MAX_OBJ_ORDER)*PAGE_SIZE) ||
                (dtor && !ctor) ||
-               (offset < 0 || offset > size))
+               (offset < 0 || offset > size)) {
+                       printk(KERN_ERR "%s: Early error in slab %s\n",
+                                       __FUNCTION__, name);
                        BUG();
+               }
 
 #if DEBUG
        WARN_ON(strchr(name, ' '));     /* It confuses parsers */