From: Ingo Molnar Date: Sat, 10 Feb 2007 09:44:57 +0000 (-0800) Subject: [PATCH] lockdep: also check for freed locks in kmem_cache_free() X-Git-Tag: v2.6.21-rc1~274^2~359 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=898552c9d807fe59f3ecaf9c300c109358375c12;p=linux-2.6-omap-h63xx.git [PATCH] lockdep: also check for freed locks in kmem_cache_free() kmem_cache_free() was missing the check for freeing held locks. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slab.c b/mm/slab.c index 348396d691a..196df70eb8c 100644 --- 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); }