Subject: Re: linux-next: manual merge of the kmemleak tree

From: Pekka Enberg <[email-masked]>
Date: Tue, 21 Apr 2009 21:02:57 +0300

Hi Catalin,

Catalin Marinas wrote:
>> I noticed that the memory allocation tracepoints were merged into
>> mainline. I'll modify kmemleak to use them and probably add another for
>> vmalloc.
> 
> After a quick look, it turns out not to be so simple. Kmemleak needs to
> trace all the memory allocations (missing some could cause false
> positives) and it currently has a static buffer to store the first
> allocations before kmemleak is fully initialised.
> 
> Registering a probe requires memory allocations and therefore it needs
> to be done after kmem_cache_init(). It means that kmemleak would miss
> several allocations before it can register the probes. I don't see any
> solution other than inserting kmemleak_*() calls near the tracing hooks.
> 
> Any other suggestion? Thanks.

Yup, sounds like kmemleak hooks should stay there as-is.

			Pekka