Re: [PATCH v3 1/4] module: fix kmemleak annotations for non init ELF sections
From: Catalin Marinas
Date: Fri Apr 14 2023 - 06:19:05 EST
On Thu, Apr 13, 2023 at 10:08:33PM -0700, Luis Chamberlain wrote:
> Commit ac3b43283923 ("module: replace module_layout with module_memory")
> reworked the way to handle memory allocations to make it clearer. But it
> lost in translation how we handled kmemleak_ignore() or kmemleak_not_leak()
> for different ELF sections.
>
> Fix this and clarify the comments a bit more. Contrary to the old way
> of using kmemleak_ignore() for init.* ELF sections we stick now only to
> kmemleak_not_leak() as per suggestion by Catalin Marinas so to avoid
> any false positives and simplify the code.
>
> Fixes: ac3b43283923 ("module: replace module_layout with module_memory")
> Reported-by: Jim Cromie <jim.cromie@xxxxxxxxx>
> Acked-by: Song Liu <song@xxxxxxxxxx>
> Suggested-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>