Re: [PATCH v3] mm/memmap: Prevent double scanning of memmap by kmemleak
From: Catalin Marinas
Date: Mon Jan 06 2025 - 04:46:58 EST
On Mon, Jan 06, 2025 at 10:11:25AM +0800, Guo Weikang wrote:
> kmemleak explicitly scans the mem_map through the valid struct page objects.
> However, memmap_alloc() was also adding this memory to the gray object list,
> causing it to be scanned twice. Removes memmap_alloc() from the
> scan list and adds a comment to clarify the behavior.
>
> Link: https://lore.kernel.org/lkml/CAOm6qn=FVeTpH54wGDFMHuCOeYtvoTx30ktnv9-w3Nh8RMofEA@xxxxxxxxxxxxxx/
>
> Signed-off-by: Guo Weikang <guoweikang.kernel@xxxxxxxxx>
Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>