From: SJ Park <sj@kernel.org>
Cc: SJ Park <sj@kernel.org>,
stable@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>,
Fernand Sieber <sieberf@amazon.com>,
Jiayuan Chen <jiayuan.chen@shopee.com>,
SeongJae Park <sjpark@amazon.de>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: [RFC PATCH 0/3] mm/damon: fix three race bugs in sysfs and core
Date: Sat, 24 Oct 2026 12:33:46 -0700 [thread overview]
Message-ID: <20261024193351.87130-1-sj@kernel.org> (raw)
There are three race condition bugs in DAMON sysfs interface and the
core layer. User impacts are not critical but better to fix sooner than
later.
Patch 1 fixes a toctou bug in DAMON sysfs interface that can mess up
DAMOS auto-tuning. Patches 2 and 3 move static variables that can be
wrongly shared with multiple kdamonds and therefore make DAMON
monitoring results be a little more indeterministic.
Note for Andrew. These are not urgent but better to take the hotfix
track in my humble opinion.
SJ Park (3):
mm/damon/sysfs-schemes: hold damon_sysfs_lock in target_metric_store()
mm/damon/core: move static variable last_nr_regions to damon_ctx
mm/damon/core: move static variable rotation to damon_ctx
include/linux/damon.h | 10 ++++++++++
mm/damon/core.c | 10 +++++-----
mm/damon/sysfs-schemes.c | 3 +++
3 files changed, 18 insertions(+), 5 deletions(-)
base-commit: f390255d9de653f4e7a9bae8c9a5ad881ad25a87
--
2.47.3
next reply other threads:[~2026-10-24 19:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 19:33 SJ Park [this message]
2026-10-24 19:33 ` [RFC PATCH 1/3] mm/damon/sysfs-schemes: hold damon_sysfs_lock in target_metric_store() SJ Park
2026-10-24 19:44 ` sashiko-bot
2026-10-24 19:33 ` [RFC PATCH 2/3] mm/damon/core: move static variable last_nr_regions to damon_ctx SJ Park
2026-10-24 19:39 ` sashiko-bot
2026-10-24 19:33 ` [RFC PATCH 3/3] mm/damon/core: move static variable rotation " SJ Park
2026-10-24 19:37 ` sashiko-bot
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=20261024193351.87130-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=jiayuan.chen@shopee.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sieberf@amazon.com \
--cc=sjpark@amazon.de \
--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 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.