From: SJ Park <sj@kernel.org>
To: Igor Putko <igorpetindev@gmail.com>
Cc: SJ Park <sj@kernel.org>,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/damon/vaddr: remove redundant RCU lock
Date: Tue, 30 Jun 2026 07:50:39 -0700 [thread overview]
Message-ID: <20260630145039.92859-1-sj@kernel.org> (raw)
In-Reply-To: <20260630102400.reply-damon@gmail.com>
On Tue, 30 Jun 2026 17:25:22 +0300 Igor Putko <igorpetindev@gmail.com> wrote:
> Hi SJ,
>
> Thanks for the reply and the pointers!
Thank you for quick reply. Nonetheless, from the next time, please reply to a
mail you are replying to, without top-posting [1]. Also, please wrap long
lines for reasonable length of columns (say, 80 columns?)
> Regarding the issue Sashiko AI flagged - I dug into damon/vaddr.c, and I think it's a real bug, but it's isolated to __damon_va_three_regions().
> damon_va_walk_page_range() is fine here, since lock_vma_under_rcu() handles stability on its own. __damon_va_three_regions() is the problematic one: right after mmap_read_lock(mm) is taken in the caller, it sets up a VMA_ITERATOR and runs for_each_vma(). But mmap_read_lock doesn't stop the OOM reaper from running concurrently, setting MMF_UNSTABLE, and leaving empty markers in the maple tree. Walking the tree in that state without a check_stable_address_space(mm) call could lead to a NULL pointer dereference.
Thank you for detailed explanation.
> Since this looks like a separate issue, I'll prepare a dedicated fix and send it as its own patch thread, so it doesn't hold up the current cleanup. Let me know if that approach works for you.
Makes sense!
[1] https://subspace.kernel.org/etiquette.html
Thanks,
SJ
[...]
prev parent reply other threads:[~2026-06-30 14:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 16:53 [PATCH] mm/damon/vaddr: remove redundant RCU lock IgorpetinDev
2026-06-29 17:06 ` sashiko-bot
2026-06-30 0:41 ` SJ Park
2026-06-30 1:00 ` SJ Park
2026-06-30 12:50 ` IgorpetinDev
2026-06-30 13:01 ` Igor Putko
2026-06-30 13:16 ` sashiko-bot
2026-06-30 13:02 ` [PATCH v2] " Igor Putko
2026-06-30 13:16 ` sashiko-bot
2026-06-30 14:03 ` SJ Park
2026-06-30 13:07 ` [PATCH] " Igor Putko
2026-06-30 13:54 ` SJ Park
2026-06-30 14:25 ` Igor Putko
2026-06-30 14:50 ` 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=20260630145039.92859-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=damon@lists.linux.dev \
--cc=igorpetindev@gmail.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 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.