From: Breno Leitao <leitao@debian.org>
To: Lance Yang <lance.yang@linux.dev>
Cc: catalin.marinas@arm.com, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com, sj@kernel.org
Subject: Re: [PATCH RFC] mm/kmemleak: avoid soft lockup when scanning task stacks
Date: Fri, 12 Jun 2026 03:39:26 -0700 [thread overview]
Message-ID: <aivhX7RtLVwBkNj6@gmail.com> (raw)
In-Reply-To: <6bc446b7-8e25-4add-9d72-a3c9e9191533@linux.dev>
On Fri, Jun 12, 2026 at 05:57:12PM +0800, Lance Yang wrote:
> > If we go this route, the aborted round has to suppress reporting, reusing
> > kmemleak's existing "scan was interrupted -> don't report" path:
> >
> > if (need_resched() && !kmemleak_stack_scan_break(g, p)) {
> > aborted = true;
> > goto unlock;
> > }
>
> I'd expect the normal case to just drop RCU, cond_resched(), take RCU
> again, see both cursors still alive, and keep walking :)
>
> > ...
> > if (scan_should_stop() || aborted)
> > return;
>
> And yeah, you're right. If we do lost a cursor, bailing out and
> skipping reporting fot that incomplete root scan should be the
> right thing, I guess :D
Thanks! Under what circumstances would the cursor actually be lost?
next prev parent reply other threads:[~2026-06-12 10:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 12:45 [PATCH RFC] mm/kmemleak: avoid soft lockup when scanning task stacks Breno Leitao
2026-06-12 1:10 ` SeongJae Park
2026-06-12 9:42 ` Breno Leitao
2026-06-12 3:16 ` Lance Yang
2026-06-12 4:27 ` Lance Yang
2026-06-12 9:09 ` Breno Leitao
2026-06-12 9:57 ` Lance Yang
2026-06-12 10:39 ` Breno Leitao [this message]
2026-06-12 11:22 ` Lance Yang
2026-06-12 11:57 ` Breno Leitao
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=aivhX7RtLVwBkNj6@gmail.com \
--to=leitao@debian.org \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=kernel-team@meta.com \
--cc=lance.yang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sj@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.