diff options
Diffstat (limited to 'lib/list_debug.c')
-rw-r--r-- | lib/list_debug.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/lib/list_debug.c b/lib/list_debug.c index 50cac9e..b8029a5 100644 --- a/lib/list_debug.c +++ b/lib/list_debug.c @@ -9,12 +9,6 @@ #include <linux/module.h> #include <linux/list.h> -#ifdef CONFIG_SEC_DEBUG_LIST_CORRUPTION -static int list_debug = 0x00000100UL; -#else -static int list_debug; -#endif - /* * Insert a new entry between two known consecutive entries. * @@ -26,20 +20,14 @@ void __list_add(struct list_head *new, struct list_head *prev, struct list_head *next) { - if (list_debug) - BUG_ON(next->prev != prev); - else - WARN(next->prev != prev, - "list_add corruption. next->prev should be " - "prev (%p), but was %p. (next=%p).\n", - prev, next->prev, next); - if (list_debug) - BUG_ON(prev->next != next); - else - WARN(prev->next != next, - "list_add corruption. prev->next should be " - "next (%p), but was %p. (prev=%p).\n", - next, prev->next, prev); + WARN(next->prev != prev, + "list_add corruption. next->prev should be " + "prev (%p), but was %p. (next=%p).\n", + prev, next->prev, next); + WARN(prev->next != next, + "list_add corruption. prev->next should be " + "next (%p), but was %p. (prev=%p).\n", + next, prev->next, prev); next->prev = new; new->next = next; new->prev = prev; @@ -65,11 +53,8 @@ void __list_del_entry(struct list_head *entry) "but was %p\n", entry, prev->next) || WARN(next->prev != entry, "list_del corruption. next->prev should be %p, " - "but was %p\n", entry, next->prev)) { - if (list_debug) - BUG(); + "but was %p\n", entry, next->prev)) return; - } __list_del(prev, next); } |