Re: [PATCH] 2.5.39 list_head debugging

From: Andrew Morton (akpm@digeo.com)
Date: Sun Sep 29 2002 - 01:12:46 EST


Zach Brown wrote:
>
> ...
> + BUG_ON(list == NULL);
> + BUG_ON(list->next == NULL);
> + BUG_ON(list->prev == NULL);
> + BUG_ON(list->next->prev != list);
> + BUG_ON(list->prev->next != list);
> + BUG_ON((list->next == list) && (list->prev != list));
> + BUG_ON((list->prev == list) && (list->next != list));
> +

Could we make these just do a printk+dump_stack and continue
on? A BUG is a bit severe.

If you do this, I suggest you add the text "warning" to
the printk. People tend to think that the dump_stack output
is an actual oops, and they get all worried.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Sep 30 2002 - 22:00:39 EST