diff options
Diffstat (limited to 'lib/list_debug.c')
| -rw-r--r-- | lib/list_debug.c | 12 | 
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/list_debug.c b/lib/list_debug.c index 9daa3fb9d1cd..d98d43f80958 100644 --- a/lib/list_debug.c +++ b/lib/list_debug.c @@ -20,7 +20,11 @@  bool __list_add_valid(struct list_head *new, struct list_head *prev,  		      struct list_head *next)  { -	if (CHECK_DATA_CORRUPTION(next->prev != prev, +	if (CHECK_DATA_CORRUPTION(prev == NULL, +			"list_add corruption. prev is NULL.\n") || +	    CHECK_DATA_CORRUPTION(next == NULL, +			"list_add corruption. next is NULL.\n") || +	    CHECK_DATA_CORRUPTION(next->prev != prev,  			"list_add corruption. next->prev should be prev (%px), but was %px. (next=%px).\n",  			prev, next->prev, next) ||  	    CHECK_DATA_CORRUPTION(prev->next != next, @@ -42,7 +46,11 @@ bool __list_del_entry_valid(struct list_head *entry)  	prev = entry->prev;  	next = entry->next; -	if (CHECK_DATA_CORRUPTION(next == LIST_POISON1, +	if (CHECK_DATA_CORRUPTION(next == NULL, +			"list_del corruption, %px->next is NULL\n", entry) || +	    CHECK_DATA_CORRUPTION(prev == NULL, +			"list_del corruption, %px->prev is NULL\n", entry) || +	    CHECK_DATA_CORRUPTION(next == LIST_POISON1,  			"list_del corruption, %px->next is LIST_POISON1 (%px)\n",  			entry, LIST_POISON1) ||  	    CHECK_DATA_CORRUPTION(prev == LIST_POISON2,  |