Skip to content

Commit 8f63fdb

Browse files
Dave JonesLinus Torvalds
authored andcommitted
[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>
1 parent 5d469ec commit 8f63fdb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎lib/list_debug.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ void __list_add(struct list_head *new,
2121
struct list_head *next)
2222
{
2323
if (unlikely(next->prev != prev)) {
24-
printk(KERN_ERR "list_add corruption. next->prev should be %p, but was %p\n",
25-
prev, next->prev);
24+
printk(KERN_ERR "list_add corruption. next->prev should be "
25+
"prev (%p), but was %p. (next=%p).\n",
26+
prev, next->prev, next);
2627
BUG();
2728
}
2829
if (unlikely(prev->next != next)) {
29-
printk(KERN_ERR "list_add corruption. prev->next should be %p, but was %p\n",
30-
next, prev->next);
30+
printk(KERN_ERR "list_add corruption. prev->next should be "
31+
"next (%p), but was %p. (prev=%p).\n",
32+
next, prev->next, prev);
3133
BUG();
3234
}
3335
next->prev = new;

0 commit comments

Comments
 (0)