diff options
author | Dave Jones <davej@redhat.com> | 2006-12-06 23:37:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:35 -0500 |
commit | 8f63fdbbd6de7d734c036948bf7c4b2bebe3ad99 (patch) | |
tree | 0cd665ca44f188922064eb4dc42625463975b9e7 | |
parent | 5d469ec0f40d65b2a0a704402990a43b2dafe197 (diff) |
[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 <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | lib/list_debug.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/list_debug.c b/lib/list_debug.c index 7ba9d823d388..4350ba9655bd 100644 --- a/lib/list_debug.c +++ b/lib/list_debug.c | |||
@@ -21,13 +21,15 @@ void __list_add(struct list_head *new, | |||
21 | struct list_head *next) | 21 | struct list_head *next) |
22 | { | 22 | { |
23 | if (unlikely(next->prev != prev)) { | 23 | if (unlikely(next->prev != prev)) { |
24 | printk(KERN_ERR "list_add corruption. next->prev should be %p, but was %p\n", | 24 | printk(KERN_ERR "list_add corruption. next->prev should be " |
25 | prev, next->prev); | 25 | "prev (%p), but was %p. (next=%p).\n", |
26 | prev, next->prev, next); | ||
26 | BUG(); | 27 | BUG(); |
27 | } | 28 | } |
28 | if (unlikely(prev->next != next)) { | 29 | if (unlikely(prev->next != next)) { |
29 | printk(KERN_ERR "list_add corruption. prev->next should be %p, but was %p\n", | 30 | printk(KERN_ERR "list_add corruption. prev->next should be " |
30 | next, prev->next); | 31 | "next (%p), but was %p. (prev=%p).\n", |
32 | next, prev->next, prev); | ||
31 | BUG(); | 33 | BUG(); |
32 | } | 34 | } |
33 | next->prev = new; | 35 | next->prev = new; |