Skip to content

Commit

Permalink
[PATCH] More list debugging context
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Jones authored and Linus Torvalds committed Dec 7, 2006
1 parent 5d469ec commit 8f63fdb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/list_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8f63fdb

Please sign in to comment.