[PATCH] lockdep: also check for freed locks in kmem_cache_free()
authorIngo Molnar <mingo@elte.hu>
Sat, 10 Feb 2007 09:44:57 +0000 (01:44 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 18:51:26 +0000 (10:51 -0800)
kmem_cache_free() was missing the check for freeing held locks.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slab.c

index 348396d691a1d832f8e0bbdf20ea26b1184dc0b3..196df70eb8cb2d1b3e57c38148b55357f85bfc01 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3751,6 +3751,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
        BUG_ON(virt_to_cache(objp) != cachep);
 
        local_irq_save(flags);
+       debug_check_no_locks_freed(objp, obj_size(cachep));
        __cache_free(cachep, objp);
        local_irq_restore(flags);
 }