Re: [PATCH 03/15] kmemleak: Add the slab memory allocation/freeinghooks
From: Dave Hansen
Date: Wed Dec 10 2008 - 13:53:22 EST
On Wed, 2008-12-10 at 18:27 +0000, Catalin Marinas wrote:
> @@ -3195,6 +3203,8 @@ static inline void *____cache_alloc(struct
> kmem_cache *cachep, gfp_t flags)
> STATS_INC_ALLOCMISS(cachep);
> objp = cache_alloc_refill(cachep, flags);
> }
> + /* avoid false negatives */
> + memleak_erase(&ac->entry[ac->avail]);
> return objp;
> }
It would be really nice here to say *how* it is avoiding false
negatives. :)
How about:
/* Don't let the pointer from the slab itself count as referencing */
-- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/