From Manfred Spraul A list_del debugging check. Signed-off-by: Andrew Morton --- 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 Fri Jan 13 17:54:46 2006 +++ 25-akpm/include/linux/list.h Fri Jan 13 17:54:46 2006 @@ -5,7 +5,9 @@ #include #include +#include #include +#include /* * These are non-NULL pointers that will result in page faults @@ -162,6 +164,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; _