From: Dave Jones Date: Wed, 24 Aug 2011 23:46:38 +0000 (+1000) Subject: When we get corruption reports, it's useful to see if the kernel was X-Git-Tag: next-20110909~1^2~101 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ce0fc37e01e213e7902c2aa8305b03ec0bc41d2c;p=karo-tx-linux.git 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 Cc: Pekka Enberg Signed-off-by: Andrew Morton --- diff --git a/mm/slab.c b/mm/slab.c index 6d90a091fdca..10a3624d8a13 100644 --- 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,8 @@ 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()); for (i = 0; i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t); i++) {