Commit b9a78e59 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] list_head debugging

A common and very subtle bug is to use list_heads which aren't on any
lists.  It causes kernel memory corruption which is observed long after
the offending code has executed.

The patch nulls out the dangling pointers so we get a nice oops at the
site of the buggy code.
parent 123d6742
......@@ -94,6 +94,8 @@ static __inline__ void __list_del(struct list_head * prev,
static __inline__ void list_del(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
entry->next = NULL;
entry->prev = NULL;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment