Re: [PATCH 6.12.y] mm/damon/reclaim: use parameter context correctly

From: SJ Park

Date: Mon Nov 16 2026 - 22:09:19 EST


On Mon, 16 Nov 2026 18:51:42 -0800 SJ Park <sj@xxxxxxxxxx> wrote:

> From: SeongJae Park <sj@xxxxxxxxxx>
>
> damon_reclaim_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 mistakenly
> over-writing the monitoring attributes and the reclaim scheme on the
> running context. It is not causing a real problem for monitoring
> attributes, but the scheme overwriting can remove scheme's internal status
> such as charged quota. Fix the wrong use of the parameter context.
>
> Link: https://lkml.kernel.org/r/20250706193207.39810-7-sj@xxxxxxxxxx
> Fixes: 11ddcfc257a3 ("mm/damon/reclaim: use damon_commit_ctx()")
> Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> (cherry picked from commit fed48693bdfeca666f7536ba88a05e9a4e5523b6)
> Signed-off-by: SJ Park <sj@xxxxxxxxxx>
> ---
> Mark Polyakov found [1] this patch is missed in 6.12.y and causing an
> issue.

By the way, it was not picked for 6.12.y because I underestimated the bug and
therefore didn't Cc: stable@. Sorry about that, Mark and stable@ maintainers.
Also appreciate again for the issue report, Mark!

>
> [1] https://lore.kernel.org/CAA5JH2yO-gw1gn_172hv0YWFfQpkXz915a=uoVH+e49P_D8-+Q@xxxxxxxxxxxxxx


Thanks,
SJ

[...]