mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-21 21:02:24 +00:00
[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 <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0c12b51712
commit
898552c9d8
@ -3751,6 +3751,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
|
|||||||
BUG_ON(virt_to_cache(objp) != cachep);
|
BUG_ON(virt_to_cache(objp) != cachep);
|
||||||
|
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
|
debug_check_no_locks_freed(objp, obj_size(cachep));
|
||||||
__cache_free(cachep, objp);
|
__cache_free(cachep, objp);
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user