public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] slab: add missing debug_check_no_locks_freed for kmem_cache_free
@ 2007-01-02 16:38 Pekka J Enberg
  2007-01-02 17:06 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Pekka J Enberg @ 2007-01-02 16:38 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, mingo

From: Pekka Enberg <penberg@cs.helsinki.fi>

Add a missing debug_check_no_locks_freed() debug check for kmem_cache_free().

Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@cs.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);
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-02 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-02 16:38 [PATCH] slab: add missing debug_check_no_locks_freed for kmem_cache_free Pekka J Enberg
2007-01-02 17:06 ` Ingo Molnar
2007-01-02 20:24   ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox