All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Breno Leitao <leitao@debian.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	David Hildenbrand <david@kernel.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	workflows@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kselftest@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH 3/4] mm: kmemleak: factor leak confirmation into a helper
Date: Wed, 12 Aug 2026 10:09:51 +0100	[thread overview]
Message-ID: <anw4X4mkepgo2-p3@arm.com> (raw)
In-Reply-To: <20260713-catalin_pto-v1-3-5b93b1131089@debian.org>

On Mon, Jul 13, 2026 at 04:48:06AM -0700, Breno Leitao wrote:
> The reporting loop in kmemleak_scan() decided whether to tag an object as
> a reported leak with a four-term compound condition whose last operand
> also had a side effect (++object->unref_scans). Mixing the candidate
> tests with the counter update made the check hard to read.
> 
> Move the state transition into confirm_leak(): it returns true when a
> still-unreferenced suspect crosses min_unref_scans consecutive scans and
> is newly flagged OBJECT_REPORTED, leaving only the reporting bookkeeping
> in the caller. No functional change.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>


  reply	other threads:[~2026-08-12  9:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 11:48 [PATCH 0/4] mm: kmemleak: reduce transient false positives by confirming leaks Breno Leitao
2026-07-13 11:48 ` [PATCH 1/4] mm: kmemleak: confirm suspected leaks with a second scan Breno Leitao
2026-07-13 12:36   ` Geert Uytterhoeven
2026-07-13 12:52     ` Breno Leitao
2026-07-13 11:48 ` [PATCH 2/4] mm: kmemleak: report leaks only after N consecutive unreferenced scans Breno Leitao
2026-07-13 11:48 ` [PATCH 3/4] mm: kmemleak: factor leak confirmation into a helper Breno Leitao
2026-08-12  9:09   ` Catalin Marinas [this message]
2026-07-13 11:48 ` [PATCH 4/4] selftests: mm: test kmemleak's N-consecutive-scan leak confirmation Breno Leitao
2026-08-12  9:40   ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anw4X4mkepgo2-p3@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=david@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=liam@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=workflows@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.