summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2025-09-15 20:15:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-19 16:33:58 +0200
commitd9c7886b84b303a893dd7b43ee871f5b1a653b2b (patch)
tree02b9200f97dc632a79954e2bcd153c6456007111 /mm
parentac42320ec873bfe726141069cfdd90ee5bc4e885 (diff)
downloadlinux-d9c7886b84b303a893dd7b43ee871f5b1a653b2b.tar.gz
linux-d9c7886b84b303a893dd7b43ee871f5b1a653b2b.tar.bz2
linux-d9c7886b84b303a893dd7b43ee871f5b1a653b2b.zip
mm/damon/lru_sort: use param_ctx for damon_attrs staging
commit e18190b7e97e9db6546390e6e0ceddae606892b2 upstream. 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. Link: https://lkml.kernel.org/r/20250916031549.115326-1-sj@kernel.org Fixes: a30969436428 ("mm/damon/lru_sort: use damon_commit_ctx()") Signed-off-by: SeongJae Park <sj@kernel.org> Reviewed-by: Joshua Hahn <joshua.hahnjy@gmail.com> Cc: Joshua Hahn <joshua.hahnjy@gmail.com> Cc: <stable@vger.kernel.org> [6.11+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/damon/lru_sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c
index c2b4f0b07147..5654e31a198a 100644
--- a/mm/damon/lru_sort.c
+++ b/mm/damon/lru_sort.c
@@ -203,7 +203,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;