[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250916031549.115326-1-sj@kernel.org>
Date: Mon, 15 Sep 2025 20:15:49 -0700
From: SeongJae Park <sj@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: SeongJae Park <sj@...nel.org>,
"# 6 . 11 . x" <stable@...r.kernel.org>,
damon@...ts.linux.dev,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
Joshua Hahn <joshua.hahnjy@...il.com>
Subject: [PATCH] mm/damon/lru_sort: use param_ctx for damon_attrs staging
damon_lru_sort_apply_parameters() allocates a new DAMON context, stages
user-specified DAMON parameters on it, and commits to running DAMON
context at once, using damon_commit_ctx(). The code is, however,
directly updating the monitoring attributes of the running context. And
the attributes are over-written by later damon_commit_ctx() call. This
means that the monitoring attributes parameters are not really working.
Fix the wrong use of the parameter context.
Fixes: a30969436428 ("mm/damon/lru_sort: use damon_commit_ctx()")
Cc: <stable@...r.kernel.org> # 6.11.x
Signed-off-by: SeongJae Park <sj@...nel.org>
Reviewed-by: Joshua Hahn <joshua.hahnjy@...il.com>
---
This was a part of misc fixes and improvements for 6.18 [1], but Joshua
thankfully found this is fixing a real user visible bug. So sending this
separately as a hotfix.
[1] https://lore.kernel.org/20250915015807.101505-4-sj@kernel.org
mm/damon/lru_sort.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c
index 14d31009c09e..ab6173a646bd 100644
--- a/mm/damon/lru_sort.c
+++ b/mm/damon/lru_sort.c
@@ -219,7 +219,7 @@ static int damon_lru_sort_apply_parameters(void)
goto out;
}
- err = damon_set_attrs(ctx, &damon_lru_sort_mon_attrs);
+ err = damon_set_attrs(param_ctx, &damon_lru_sort_mon_attrs);
if (err)
goto out;
base-commit: ea93a9235c1c6e61cfa6e5612b7b6b3fc41e79e1
--
2.39.5
Powered by blists - more mailing lists