From: Dave Jones Date: Thu, 7 Dec 2006 04:37:09 +0000 (-0800) Subject: [PATCH] More list debugging context X-Git-Tag: v2.6.20-rc1~145^2^2~174 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8f63fdbbd6de7d734c036948bf7c4b2bebe3ad99;p=linux-2.6-omap-h63xx.git [PATCH] More list debugging context Print the other (hopefully) known good pointer when list_head debugging too, which may yield additional clues. Also fix for 80-columns to win akpm brownie points. Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/list_debug.c b/lib/list_debug.c index 7ba9d823d38..4350ba9655b 100644 --- a/lib/list_debug.c +++ b/lib/list_debug.c @@ -21,13 +21,15 @@ void __list_add(struct list_head *new, struct list_head *next) { if (unlikely(next->prev != prev)) { - printk(KERN_ERR "list_add corruption. next->prev should be %p, but was %p\n", - prev, next->prev); + printk(KERN_ERR "list_add corruption. next->prev should be " + "prev (%p), but was %p. (next=%p).\n", + prev, next->prev, next); BUG(); } if (unlikely(prev->next != next)) { - printk(KERN_ERR "list_add corruption. prev->next should be %p, but was %p\n", - next, prev->next); + printk(KERN_ERR "list_add corruption. prev->next should be " + "next (%p), but was %p. (prev=%p).\n", + next, prev->next, prev); BUG(); } next->prev = new;