* [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
* Re: [PATCH] slab: add missing debug_check_no_locks_freed for kmem_cache_free
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
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2007-01-02 17:06 UTC (permalink / raw)
To: Pekka J Enberg; +Cc: akpm, linux-kernel
* Pekka J Enberg <penberg@cs.helsinki.fi> wrote:
> From: Pekka Enberg <penberg@cs.helsinki.fi>
>
> Add a missing debug_check_no_locks_freed() debug check for
> kmem_cache_free().
hm, i have a similar fix in -rt already, and i sent a patch for this:
http://lkml.org/lkml/2006/12/18/104
have i missed some API variant?
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] slab: add missing debug_check_no_locks_freed for kmem_cache_free
2007-01-02 17:06 ` Ingo Molnar
@ 2007-01-02 20:24 ` Pekka Enberg
0 siblings, 0 replies; 3+ messages in thread
From: Pekka Enberg @ 2007-01-02 20:24 UTC (permalink / raw)
To: Ingo Molnar; +Cc: akpm, linux-kernel
Pekka J Enberg <penberg@cs.helsinki.fi> wrote:
> > Add a missing debug_check_no_locks_freed() debug check for
> > kmem_cache_free().
On 1/2/07, Ingo Molnar <mingo@elte.hu> wrote:
> hm, i have a similar fix in -rt already, and i sent a patch for this:
>
> http://lkml.org/lkml/2006/12/18/104
>
> have i missed some API variant?
Oh, I missed that. I don't think it's in Linus' tree yet, though. Your
patch looks good but I prefer mine as it's better to have the check in
one place.
^ 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