From: sashiko-bot@kernel.org
To: "SJ Park" <sj@kernel.org>
Cc: damon@lists.linux.dev
Subject: Re: [RFC PATCH 6.18.y 3/5] mm/damon/sysfs-schemes: read sysfs_filter->sz_range only once
Date: Sat, 07 Nov 2026 20:19:35 +0000 [thread overview]
Message-ID: <sashiko-outbox-203265@kernel.org> (raw)
In-Reply-To: <20261107201001.206120-4-sj@kernel.org>
> DAMON sysfs interface reads the user-provided size range arguments for
> hugepage_size type DAMOS filter twice. Once for validation, and once
> again for assignments to the variable that will be passed to the core
> layer. If the user updates the arguments in parallel, an invalid size
> range could be passed to the core layer. Avoid it by doing the
> assignments first, and then validating the assigned variables before
> passing those to the core layer.
>
> User impact of the bug should be trivial. From the core layer's
> perspective, the invalid size range is not really invalid. It just works
> as having a weird size range. No critical issues such as a crash or a
> leak could happen. And sane users ain't do such parallel arguments update
> anyway. If they do, such racy behavior is arguably somewhat expected and
> deserved. That said, there is no reason to keep such races.
>
> Link: https://lore.kernel.org/20260914142327.92510-3-sj@kernel.org
> Fixes: ea1f204ba29a ("mm/damon/sysfs-schemes: add files for setting damos_filter->sz_range")
> Signed-off-by: SJ Park <sj@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Cc: Brendan Higgins <brendan.higgins@linux.dev>
> Cc: David Gow <davidgow@davidgow.net>
> Cc: Usama Arif <usamaarif642@gmail.com>
> Cc: <stable@vger.kernel.org>
> (cherry picked from commit af19aff38d6faea35b10f26cca32d0e54f8aea5e)
> Signed-off-by: SJ Park <sj@kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261107201001.206120-1-sj@kernel.org?part=3
next prev parent reply other threads:[~2026-11-07 20:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 20:09 [RFC PATCH 6.18.y 0/5] mm/damon: porting fixes that cherry-pick failed on 2026-11-07 SJ Park
2026-11-07 20:09 ` [RFC PATCH 6.18.y 1/5] mm/damon/core: skip applying scheme if region split for quota fails SJ Park
2026-11-07 20:18 ` sashiko-bot
2026-11-07 21:06 ` SJ Park
2026-11-07 20:09 ` [RFC PATCH 6.18.y 2/5] mm/damon/core: handle uninitialized damos_quota_goal->last_psi_total SJ Park
2026-11-07 20:16 ` sashiko-bot
2026-11-07 20:09 ` [RFC PATCH 6.18.y 3/5] mm/damon/sysfs-schemes: read sysfs_filter->sz_range only once SJ Park
2026-11-07 20:19 ` sashiko-bot [this message]
2026-11-09 0:34 ` Sasha Levin
2026-11-09 0:51 ` SJ Park
2026-11-09 0:58 ` SJ Park
2026-11-07 20:10 ` [RFC PATCH 6.18.y 4/5] mm/damon/core: remove unreachable damos charge_{target,addr}_from SJ Park
2026-11-07 20:21 ` sashiko-bot
2026-11-07 20:10 ` [RFC PATCH 6.18.y 5/5] mm/damon/core: filter out damos address filter-split failed region SJ Park
2026-11-07 20:16 ` 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=sashiko-outbox-203265@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=damon@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--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.