Re: [PATCH 1/3] kmemcheck: prepare for SLAB hooks

From: Vegard Nossum
Date: Fri May 09 2008 - 14:08:04 EST


On Thu, May 8, 2008 at 11:02 PM, Pekka J Enberg <penberg@xxxxxxxxxxxxxx> wrote:
> From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
>
> Make mm/slub_kmemcheck.c more generic in preparation for adding kmemcheck hooks
> to SLAB which does not use compound pages by default and has slightly different
> way for keeping track of object size than SLUB.
>
> Cc: Ingo Molnar <mingo@xxxxxxx>
> Cc: Christoph Lameter <clameter@xxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Vegard Nossum <vegard.nossum@xxxxxxxxx>
> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
> ---
> include/linux/slub_kmemcheck.h | 19 +++++++++++--------
> mm/slub.c | 8 ++++----
> mm/slub_kmemcheck.c | 23 ++++++++++-------------
> 3 files changed, 25 insertions(+), 25 deletions(-)

[sniip]

> @@ -1757,7 +1757,7 @@
> struct kmem_cache_cpu *c;
> unsigned long flags;
>
> - kmemcheck_slab_free(s, object);
> + kmemcheck_slab_free(s, object, c->objsize);

Hm, "'c' is used uninitialized in this function". I guess it should be
moved a bit downwards. Can you fix it?

Vegard

--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
--
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/