From Manfred Spraul A list_del debugging check. Signed-off-by: Andrew Morton --- 25-akpm/include/linux/list.h | 4 ++++ 1 files changed, 4 insertions(+) diff -puN include/linux/list.h~list_del-debug include/linux/list.h --- 25/include/linux/list.h~list_del-debug 2005-03-08 11:40:27.000000000 -0800 +++ 25-akpm/include/linux/list.h 2005-03-08 11:40:49.000000000 -0800 @@ -5,7 +5,9 @@ #include #include +#include #include +#include /* * These are non-NULL pointers that will result in page faults @@ -160,6 +162,8 @@ static inline void __list_del(struct lis */ static inline void list_del(struct list_head *entry) { + BUG_ON(entry->prev->next != entry); + BUG_ON(entry->next->prev != entry); __list_del(entry->prev, entry->next); entry->next = LIST_POISON1; entry->prev = LIST_POISON2; _