[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1227523423.8377.39.camel@pc1117.cambridge.arm.com>
Date: Mon, 24 Nov 2008 10:43:43 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: Pekka Enberg <penberg@...helsinki.fi>
Cc: linux-kernel@...r.kernel.org, Matt Mackall <mpm@...enic.com>,
Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [PATCH 2.6.28-rc5 03/11] kmemleak: Add the memory
allocation/freeing hooks
On Mon, 2008-11-24 at 12:35 +0200, Pekka Enberg wrote:
> On Mon, 2008-11-24 at 10:18 +0000, Catalin Marinas wrote:
> > My understanding is that the ->s_mem value points to the slab itself but
> > the same pointer might actually be the beginning of an allocated memory
> > block, hence we get at least one reference to this block.
>
> Yes, ->s_mem points to the first object in the slab if CONFIG_DEBUG_SLAB
> is disabled.
>
> So if I understood this right, in case the first object in the slab is
> leaked (it's allocated but no one references to it), we want to make
> sure kmemleak doesn't see the ->s_mem link which would cause a false
> negative (i.e. a leak that is not reported).
>
> Did I get it correct this time?
Yes.
--
Catalin
--
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