From: Breno Leitao <leitao@debian.org>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: kmemleak: confirm suspected leaks with a second scan
Date: Mon, 13 Jul 2026 02:03:29 -0700 [thread overview]
Message-ID: <alSpwP4hyghuj-x4@gmail.com> (raw)
In-Reply-To: <alSpN_sTpUkjDFxh@arm.com>
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 <catalin.marinas@arm.com>
> > > Assisted-by: Claude:claude-opus-4-8
> > > Cc: Breno Leitao <leitao@debian.org>
> > > Cc: Andrew Morton <akpm@linux-foundation.org>
> >
> > Tested-by: Breno Leitao <leitao@debian.org>
> > Reviewed-by: Breno Leitao <leitao@debian.org>
>
> 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.
prev parent reply other threads:[~2026-07-13 9:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 17:24 [PATCH] mm: kmemleak: confirm suspected leaks with a second scan Catalin Marinas
2026-07-10 3:13 ` Andrew Morton
2026-07-10 8:51 ` Breno Leitao
2026-07-13 9:00 ` Catalin Marinas
2026-07-13 9:03 ` Breno Leitao [this message]
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=alSpwP4hyghuj-x4@gmail.com \
--to=leitao@debian.org \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox