diff options
| author | SeongJae Park <sj@kernel.org> | 2025-09-15 20:15:49 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-19 16:37:38 +0200 |
| commit | 5adaa3bea8b9bc3749c742fb64e930bfaba19fba (patch) | |
| tree | 62c9dd0fb2854d92e7be9d1238ce03ff23be0311 /mm | |
| parent | 0ccd91cf749536d41307a07e60ec14ab0dbf21f5 (diff) | |
| download | linux-5adaa3bea8b9bc3749c742fb64e930bfaba19fba.tar.gz linux-5adaa3bea8b9bc3749c742fb64e930bfaba19fba.tar.bz2 linux-5adaa3bea8b9bc3749c742fb64e930bfaba19fba.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c index b5a5ed16a7a5..26d6a2adb9cd 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; |
