aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2011-11-15 18:03:52 -0500
committerPekka Enberg <penberg@kernel.org>2011-11-16 14:14:44 -0500
commitface37f5e615646f364fa848f0a5c9d361d7a46e (patch)
treead6af6c7251032f4f05a7f220ee3fb3e9eba20b2 /mm/slab.c
parent265d47e7115023df9e2b7a864b207b4738d9e18c (diff)
slab: add taint flag outputting to debug paths.
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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c
index b0414d12fd08..a7f9c244aac6 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1941,8 +1941,8 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp)
1941 /* Print header */ 1941 /* Print header */
1942 if (lines == 0) { 1942 if (lines == 0) {
1943 printk(KERN_ERR 1943 printk(KERN_ERR
1944 "Slab corruption: %s start=%p, len=%d\n", 1944 "Slab corruption (%s): %s start=%p, len=%d\n",
1945 cachep->name, realobj, size); 1945 print_tainted(), cachep->name, realobj, size);
1946 print_objinfo(cachep, objp, 0); 1946 print_objinfo(cachep, objp, 0);
1947 } 1947 }
1948 /* Hexdump the affected line */ 1948 /* Hexdump the affected line */
@@ -3051,8 +3051,9 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp)
3051 if (entries != cachep->num - slabp->inuse) { 3051 if (entries != cachep->num - slabp->inuse) {
3052bad: 3052bad:
3053 printk(KERN_ERR "slab: Internal list corruption detected in " 3053 printk(KERN_ERR "slab: Internal list corruption detected in "
3054 "cache '%s'(%d), slabp %p(%d). Hexdump:\n", 3054 "cache '%s'(%d), slabp %p(%d). Tainted(%s). Hexdump:\n",
3055 cachep->name, cachep->num, slabp, slabp->inuse); 3055 cachep->name, cachep->num, slabp, slabp->inuse,
3056 print_tainted());
3056 print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 16, 1, slabp, 3057 print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 16, 1, slabp,
3057 sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t), 3058 sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t),
3058 1); 3059 1);