[PATCH] Make

From: Dave Jones
Date: Mon May 19 2008 - 23:31:04 EST

Arjan noted that the list_head debugging is BUG'ing when it detects
corruption. By causing the box to panic immediately, we're possibly
losing some bug reports. Changing this to a WARN_ON should mean
we at the least start seeing reports collected at kerneloops.org

[ I chose to BUG() when I first added that code, because I was
chasing a bug which caused a lockup anyway, so it made little difference
to me. ]

Signed-off-by: Dave Jones <davej@xxxxxxxxxx>

diff --git a/lib/list_debug.c b/lib/list_debug.c
index 4350ba9..09f28bf 100644
--- a/lib/list_debug.c
+++ b/lib/list_debug.c
@@ -24,13 +24,13 @@ void __list_add(struct list_head *new,
printk(KERN_ERR "list_add corruption. next->prev should be "
"prev (%p), but was %p. (next=%p).\n",
prev, next->prev, next);
- BUG();
+ WARN_ON(1);
if (unlikely(prev->next != next)) {
printk(KERN_ERR "list_add corruption. prev->next should be "
"next (%p), but was %p. (prev=%p).\n",
next, prev->next, prev);
- BUG();
+ WARN_ON(1);
next->prev = new;
new->next = next;
@@ -64,12 +64,12 @@ void list_del(struct list_head *entry)
if (unlikely(entry->prev->next != entry)) {
printk(KERN_ERR "list_del corruption. prev->next should be %p, "
"but was %p\n", entry, entry->prev->next);
- BUG();
+ WARN_ON(1);
if (unlikely(entry->next->prev != entry)) {
printk(KERN_ERR "list_del corruption. next->prev should be %p, "
"but was %p\n", entry, entry->next->prev);
- BUG();
+ WARN_ON(1);
__list_del(entry->prev, entry->next);
entry->next = LIST_POISON1;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/