Re: [PATCH] 2.5.39 list_head debugging

Andrew Morton (akpm@digeo.com)
Sat, 28 Sep 2002 23:12:46 -0700


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/