]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
slab: add taint flag outputting to debug paths.
authorDave Jones <davej@redhat.com>
Mon, 24 Oct 2011 14:53:55 +0000 (01:53 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 25 Oct 2011 09:07:32 +0000 (20:07 +1100)
When we get corruption reports, it's useful to see if the kernel was
tainted, to rule out problems we can't do anything about.

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slab.c

index 708efe886154da626cfe01f4a2b6eaf055ada914..9ef775470c8b22dff3e52691f57ad94f403d858a 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1927,8 +1927,8 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp)
                        /* Print header */
                        if (lines == 0) {
                                printk(KERN_ERR
-                                       "Slab corruption: %s start=%p, len=%d\n",
-                                       cachep->name, realobj, size);
+                                       "Slab corruption (%s): %s start=%p, len=%d\n",
+                                       print_tainted(), cachep->name, realobj, size);
                                print_objinfo(cachep, objp, 0);
                        }
                        /* Hexdump the affected line */
@@ -3037,8 +3037,9 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp)
        if (entries != cachep->num - slabp->inuse) {
 bad:
                printk(KERN_ERR "slab: Internal list corruption detected in "
-                               "cache '%s'(%d), slabp %p(%d). Hexdump:\n",
-                       cachep->name, cachep->num, slabp, slabp->inuse);
+                       "cache '%s'(%d), slabp %p(%d). Tainted(%s). Hexdump:\n",
+                       cachep->name, cachep->num, slabp, slabp->inuse,
+                       print_tainted());
                print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 16, 1, slabp,
                        sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t),
                        1);