[PATCH] slab: redzone double-free detection
authorPekka Enberg <penberg@cs.helsinki.fi>
Fri, 23 Jun 2006 09:03:24 +0000 (02:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:42:49 +0000 (07:42 -0700)
commit58ce1fd5805647a58a050bbbbd2252ea5ecb47b3
tree639aa44f21d0176c771b8b6e76d9c7ce9e2d1d19
parentb344e05c585406904c70865e531e02467c4c7931
[PATCH] slab: redzone double-free detection

At present our slab debugging tells us that it detected a double-free or
corruption - it does not distinguish between them.  Sometimes it's useful
to be able to differentiate between these two types of information.

Add double-free detection to redzone verification when freeing an object.
As explained by Manfred, when we are freeing an object, both redzones
should be RED_ACTIVE.  However, if both are RED_INACTIVE, we are trying to
free an object that was already free'd.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/slab.c