[PATCH] slab: add missing debug_check_no_locks_freed for kmem_cache_free
From: Pekka J Enberg
Date: Tue Jan 02 2007 - 11:39:13 EST
From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
Add a missing debug_check_no_locks_freed() debug check for kmem_cache_free().
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
---
mm/slab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: 2.6/mm/slab.c
===================================================================
--- 2.6.orig/mm/slab.c
+++ 2.6/mm/slab.c
@@ -3491,6 +3491,8 @@ static inline void __cache_free(struct k
{
struct array_cache *ac = cpu_cache_get(cachep);
+ debug_check_no_locks_freed(objp, obj_size(cachep));
+
check_irq_off();
objp = cache_free_debugcheck(cachep, objp, __builtin_return_address(0));
@@ -3757,7 +3759,6 @@ void kfree(const void *objp)
local_irq_save(flags);
kfree_debugcheck(objp);
c = virt_to_cache(objp);
- debug_check_no_locks_freed(objp, obj_size(c));
__cache_free(c, (void *)objp);
local_irq_restore(flags);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/