Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f63fdbb authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds
Browse files

[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: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5d469ec0
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -21,13 +21,15 @@ void __list_add(struct list_head *new,
			      struct list_head *next)
			      struct list_head *next)
{
{
	if (unlikely(next->prev != prev)) {
	if (unlikely(next->prev != prev)) {
		printk(KERN_ERR "list_add corruption. next->prev should be %p, but was %p\n",
		printk(KERN_ERR "list_add corruption. next->prev should be "
			prev, next->prev);
			"prev (%p), but was %p. (next=%p).\n",
			prev, next->prev, next);
		BUG();
		BUG();
	}
	}
	if (unlikely(prev->next != next)) {
	if (unlikely(prev->next != next)) {
		printk(KERN_ERR "list_add corruption. prev->next should be %p, but was %p\n",
		printk(KERN_ERR "list_add corruption. prev->next should be "
			next, prev->next);
			"next (%p), but was %p. (prev=%p).\n",
			next, prev->next, prev);
		BUG();
		BUG();
	}
	}
	next->prev = new;
	next->prev = new;