Re: [PATCH 05/15] kmemleak: Add the slub memory allocation/freeing hooks

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Catalin Marinas
Date: Thursday, December 18, 2008 - 8:28 am

Hi Pekka,

On Thu, 2008-12-18 at 12:51 +0200, Pekka Enberg wrote:

Just to make sure I understand it correctly, the slab_free() fast path
stores the pointer to the freed object into c->freelist. However, this
object is no longer tracked by kmemleak because of the
kmemleak_free_recursive() call at the beginning of this function (false
negatives make sense only for allocated objects).

On the slab_alloc() fast path, the pointer to an allocated object is
obtained from the c->freelist pointer but this seems to be overridden by
the pointer to the next free object, object[c->offset], which isn't yet
tracked by kmemleak. So, during a memory scan, it shouldn't matter that
the kmem_cache_cpu structures are called as they don't contain any
pointer to an allocated (not free) object.

The new slabs are allocated with alloc_pages() and these are not tracked
by kmemleak.

Is my understanding correct? Thanks.

-- 
Catalin

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/15] Kernel memory leak detector, Catalin Marinas, (Wed Dec 10, 11:26 am)
[PATCH 01/15] kmemleak: Add the base support, Catalin Marinas, (Wed Dec 10, 11:26 am)
[PATCH 08/15] kmemleak: Add modules support, Catalin Marinas, (Wed Dec 10, 11:27 am)
[PATCH 11/15] kmemleak: Remove some of the kmemleak false ..., Catalin Marinas, (Wed Dec 10, 11:27 am)
[PATCH 12/15] kmemleak: Enable the building of the memory ..., Catalin Marinas, (Wed Dec 10, 11:28 am)
[PATCH 14/15] kmemleak: Simple testing module for kmemleak, Catalin Marinas, (Wed Dec 10, 11:28 am)
[PATCH 15/15] kmemleak: Add the corresponding MAINTAINERS ..., Catalin Marinas, (Wed Dec 10, 11:28 am)
Re: [PATCH 00/15] Kernel memory leak detector, Catalin Marinas, (Thu Dec 11, 2:44 am)
Re: [PATCH 01/15] kmemleak: Add the base support, Pekka Enberg, (Thu Dec 11, 3:01 pm)
Re: [PATCH 01/15] kmemleak: Add the base support, Catalin Marinas, (Fri Dec 12, 4:36 am)
Re: [PATCH 01/15] kmemleak: Add the base support, Pekka Enberg, (Fri Dec 12, 6:14 am)
Re: [PATCH 01/15] kmemleak: Add the base support, Paul E. McKenney, (Tue Dec 16, 12:36 pm)
Re: [PATCH 01/15] kmemleak: Add the base support, Catalin Marinas, (Wed Dec 17, 2:44 am)
Re: [PATCH 01/15] kmemleak: Add the base support, Paul E. McKenney, (Wed Dec 17, 10:15 am)
Re: [PATCH 05/15] kmemleak: Add the slub memory allocation ..., Catalin Marinas, (Thu Dec 18, 8:28 am)
Re: [PATCH 03/15] kmemleak: Add the slab memory allocation ..., Christoph Lameter, (Thu Dec 18, 9:49 am)
Re: [PATCH 03/15] kmemleak: Add the slab memory allocation ..., Christoph Lameter, (Thu Dec 18, 12:35 pm)
Re: [PATCH 03/15] kmemleak: Add the slab memory allocation ..., Christoph Lameter, (Thu Dec 18, 2:41 pm)