[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0701021838230.24781@sbz-30.cs.Helsinki.FI>
Date: Tue, 2 Jan 2007 18:38:47 +0200 (EET)
From: Pekka J Enberg <penberg@...helsinki.fi>
To: akpm@...l.org
cc: linux-kernel@...r.kernel.org, mingo@...e.hu
Subject: [PATCH] slab: add missing debug_check_no_locks_freed for kmem_cache_free
From: Pekka Enberg <penberg@...helsinki.fi>
Add a missing debug_check_no_locks_freed() debug check for kmem_cache_free().
Cc: Ingo Molnar <mingo@...e.hu>
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists