From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 513B01D89FE for ; Mon, 6 Jan 2025 09:46:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736156813; cv=none; b=nXJd4lkAkdfcU/Kr+uKQbqozbW9+3kvOARMramg0Tiz9peucP6YjbDYddpKvk3cxqz+7ezGiOZAPzTjm296zB1geVi/ysVkCdUt0xI+502FhDM6DTwZrMQVoSBOGNqgrF4TY60qi0lva62om0BOqHcwZEh4rXtfB8pogczI82rI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736156813; c=relaxed/simple; bh=hbvgcaLTxo0FDKXeAQhJYxHev1DvE1e2LVpv5KU7aPk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N11t2pt46GjeNQYaevzMPonoP3cyzatzP5kq4I6Ncf7RrNCmsZy7qlo1mOHBv9BJOx58h2F9njfJSSao+AG76RKKgmWakq+RuukrOYDGfSLbIQY6btUMROxy2BAzOatzEK+sYvAGW5vyfYHhf4bBaNPOvjwNDaJcfR9heVSonM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C51CBC4CED2; Mon, 6 Jan 2025 09:46:51 +0000 (UTC) Date: Mon, 6 Jan 2025 09:46:49 +0000 From: Catalin Marinas To: Guo Weikang Cc: Mike Rapoport , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm/memmap: Prevent double scanning of memmap by kmemleak Message-ID: References: <20250106021126.1678334-1-guoweikang.kernel@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250106021126.1678334-1-guoweikang.kernel@gmail.com> 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@mail.gmail.com/ > > Signed-off-by: Guo Weikang Reviewed-by: Catalin Marinas