From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D28B3DB311 for ; Mon, 13 Jul 2026 09:00:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783933256; cv=none; b=GwvN1BHdeWqCGg+aDCQwkJgeCr0kHPkGKv5rH+RCF36fl9dRtG7wbWXOGhwRN/LSG2EtdtWx0QxIPPOaOtPvIFziBONuOnXF7pqyeCkTALJ3gr6N7anPyWBsR4jYrTooj81kZOZdaClnAZsBt0GBWiU/GY/nlHJYmtqeEr57o9w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783933256; c=relaxed/simple; bh=t9O/1hD3qn8hp9fPVidp6LNF4W82iFP7Kx9rmmWgG7w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cz9PJQVFjKbhwnYdfXThYE8h7ELO+4T5Hfyx1lHw72y+h29SOEZe7nGM2HvXQ4MK2OBotoWk4lJLJUWNRTesDgZ/hjbsGRs4TzmxYjnowlBBgucCUpNreCIKNOpxeioa1WpdhjHNRcxoiauWPnKDSjDU54i/9ML2FaqyOXSHOBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=ZjVUbm1i; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="ZjVUbm1i" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3BB741576; Mon, 13 Jul 2026 02:00:48 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 919C93F93E; Mon, 13 Jul 2026 02:00:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1783933252; bh=t9O/1hD3qn8hp9fPVidp6LNF4W82iFP7Kx9rmmWgG7w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZjVUbm1i0r7id0oXgnlEVsYHjjTTsjagynsDqwUq4JWQboX2Ta+P0jQIneVqXglDF Y0iOs637bqapD1xlzQM3YZPtUEaAwFrKBHTwUhWke7Ow02jmtEmAo0gbD34MtSDSHl bRQtizh+12rSoMMLXxrwY+KFMReQSmAN745ISqtk= Date: Mon, 13 Jul 2026 10:00:39 +0100 From: Catalin Marinas To: Breno Leitao Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [PATCH] mm: kmemleak: confirm suspected leaks with a second scan Message-ID: References: <20260709173347.689607-1-catalin.marinas@arm.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: On Fri, Jul 10, 2026 at 01:51:40AM -0700, Breno Leitao wrote: > On Thu, Jul 09, 2026 at 06:24:47PM +0100, Catalin Marinas wrote: > > The kmemleak marking phase is not atomic. While the object graph is > > traversed, the kernel can modify pointers, free objects or allocate new > > ones. If a reference to an object is moved from one location to another, > > kmemleak scanning may miss it. We have explicit annotations like > > kmemleak_transient_leak() but identifying and maintaining them is not > > trivial. > > > > Given that such transient leaks are short-lived, rather than just > > reporting such objects as leaks, do another scan to confirm the > > suspected objects. If no new leaks are found during the first scan, skip > > the confirmation one. > > > > Signed-off-by: Catalin Marinas > > Assisted-by: Claude:claude-opus-4-8 > > Cc: Breno Leitao > > Cc: Andrew Morton > > Tested-by: Breno Leitao > Reviewed-by: Breno Leitao Thanks! > PS: This is now conflicting with commit 946935b07cc94 ("mm/kmemleak: > skip the remaining scan phases when interrupted"), which has just showed > up in linux-next. So, a respin might be required. > > > BTW, I'll be away from Saturday for three weeks. I may reply > > occasionally but won't be able to test anything. > > Let me know if you want me to respin it based on linux-next. Yes, please, you have time. Thank you! -- Catalin