Re: [PATCH -mm] kmemleak: Fix section mismatch in kmemleak.c

From: Catalin Marinas
Date: Wed Feb 18 2009 - 05:07:22 EST


On Sat, 2009-02-14 at 09:42 +0600, Rakib Mullick wrote:
> Impact: Section mismatch
>
> The function kmemleak_alloc() is called from kernel allocators.
> kmemleak_alloc() calls log_early() but being log_early() marked as
> __init it causes following section mismatches. Being called from
> kernel allocators, kmemleak_allock() will be called after freeing up
> the init memory and log_early() will also called. So, unmarking __init
> from log_early() fixes the warning. If anything else please notice.

Thanks for the patch. There's nothing dangerous as kmemleak takes care
of not using the __init functions after it was initialised but I
couldn't find a way to free these functions/data and also avoid the
warning.

Anyway, that's fine as an interim patch but I think I'll just allocate
some pages dynamically for the early logging buffer so that we can free
them once initialised. I'll update the kmemleak branch sometime this
week.

Thanks.

--
Catalin

--
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/