From: SJ Park <sj@kernel.org>
To: SJ Park <sj@kernel.org>
Cc: stable@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [RFC PATCH] mm/damon/core: handle region split failure in apply_min_nr_regions()
Date: Fri, 17 Jul 2026 18:16:34 -0700 [thread overview]
Message-ID: <20260718011634.94132-1-sj@kernel.org> (raw)
In-Reply-To: <20260718010312.90397-1-sj@kernel.org>
On Fri, 17 Jul 2026 18:03:12 -0700 SJ Park <sj@kernel.org> wrote:
> On Fri, 17 Jul 2026 17:43:00 -0700 SJ Park <sj@kernel.org> wrote:
>
> > damon_apply_min_nr_regions() repeatedly split each region until its size
> > becomes small enough to meet the user-defined low limit of the number of
> > regions. The loop assumes the split operation (damon_split_region_at())
> > will always succeed and create the new region. But the operation could
> > silently fail for memory allocation failures, for example. If such
> > failure happens and the region was the last region, the linked
> > list-based next region fetching returns invalid pointer. As a result,
> > invalid memory dereference and corruption could happen. Fix by breaking
> > the loop in the corner case.
>
> Sashiko found no blocker for this series. Sashiko sent findings to damon@
> mailing list [1], and I replied to all the comments. Please read those for
> details.
My intention was to add this reply to other mail[1] but I only mistakenly
replied here.
This is true, though. Sashiko found no issue in this patch. But that means
nothing since this is an RFC. I will repost this patch after dropping the RFC
and rebasing to latest mm-new, tomorrow.
[1] https://lore.kernel.org/20260718011322.94001-1-sj@kernel.org
>
> [1] https://lore.kernel.org/damon/
Thanks,
SJ
[...]
prev parent reply other threads:[~2026-07-18 1:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 0:43 SJ Park
2026-07-18 1:03 ` SJ Park
2026-07-18 1:16 ` SJ Park [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=20260718011634.94132-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox