From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 64A5C3DCD8D for ; Mon, 13 Jul 2026 09:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783933420; cv=none; b=XOc0KdTuQKd45ZfT8lfGfBasMCxG+KT7yJI3O2YlnbgeHHmTML+9PFAg5U3GwgGaImrBVRtmYFAv6Pxch6yCON79N5VtVIwATiQQDMgXmxU6pr+QUV0whteq67uFudrqZF/lxXupjPVLNXxne21bLYrfkuI414nl6eMbMVZ55WQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783933420; c=relaxed/simple; bh=PUgFtmOLVLm7ufrd40qxS4PvUI5E9AzP0CqYm+Fy4iw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oA/Ni2qD8wG6vRt3MDMp0pEjUV2kgmfPusEDVk5j8rjTQzNyD48u/AmgEqh3ok9Hw1Ec57R6p3tFXUrXAGcEbqFnkhQ2Giz6Ikz4XINExYRjH1fUEFvrzjsReUkqNEn3XggNhysyvlZ/23/K+0ZfTHFKMTeIsbzzHBgRukC1XzY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=b468/HCN; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="b468/HCN" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3BBr7zjRouO3G2NSuqXNMmvWjnBpUuLq7/WaloAanxI=; b=b468/HCNQ4+KZwSA//T2I7MmIa mUnsF1tYfaMbE1y5VZKPPJSWeD15dwI+57ElHvSom/QPDyOW+HNOxBFub3m4i80is/hMvXHxzmkM6 l5DGPmJcrXs+MW7G30++if82wWn6PUH+94dIKAQVPj2A83eD7730/03Qt5qas20ZYn+Lx7lkf3oGd Ii7sRn5FI6e5ZAsesb++pHAsOGcZSEZrH8OyM7obWzF4296Lp8K3MUe8DPBAD/4WwgbmlvqcFFNe6 vxGX0PGaHXJT5Z30gX4vEjW/k9lN422VBYSDfmZVPcAFCaUjrad06v2HGkV7q0KvCrmPf7UAtLlpn p3wVPBqQ==; Received: from authenticated-user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wjCZY-001O7F-2k; Mon, 13 Jul 2026 09:03:33 +0000 Date: Mon, 13 Jul 2026 02:03:29 -0700 From: Breno Leitao To: Catalin Marinas 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: X-Debian-User: leitao On Mon, Jul 13, 2026 at 10:00:39AM +0100, Catalin Marinas wrote: > 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! Ack, I will respin soon.