Files
twx-linux/kernel
Phil Carmody 9432a739a5 cgroups: if you list_empty() a head then don't list_del() it
commit 8d2587970b upstream.

list_del() leaves poison in the prev and next pointers.  The next
list_empty() will compare those poisons, and say the list isn't empty.
Any list operations that assume the node is on a list because of such a
check will be fooled into dereferencing poison.  One needs to INIT the
node after the del, and fortunately there's already a wrapper for that -
list_del_init().

Some of the dels are followed by deallocations, so can be ignored, and one
can be merged with an add to make a move.  Apart from that, I erred on the
side of caution in making nodes list_empty()-queriable.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Reviewed-by: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-27 11:35:43 -07:00
..
2010-12-22 18:57:02 +01:00
2010-08-09 16:48:42 -04:00
…
2010-10-30 01:42:19 -04:00
2010-11-03 13:49:58 -04:00
2010-10-30 01:42:19 -04:00
2010-10-30 08:45:43 -04:00
…
…
…
…
2011-01-13 17:32:43 -08:00
2010-12-16 11:36:43 +01:00
…
2010-11-01 15:38:34 -04:00
2010-10-01 10:50:58 -07:00
…
…
…
2010-08-19 17:18:02 -07:00
…
…
…
2010-11-18 13:27:46 +01:00
…
2011-01-31 13:01:27 +10:00
2011-03-08 02:22:27 -05:00
…
…
2010-12-29 11:31:38 -08:00
…