Re: [PATCH v2 1/3] mm/damon/sysfs: fix param_ctx leak on damon_sysfs_new_test_ctx() failure
From: SeongJae Park
Date: Fri Mar 20 2026 - 20:57:48 EST
On Fri, 20 Mar 2026 16:35:57 +0000 Josh Law <objecting@xxxxxxxxxxxxx> wrote:
> When damon_sysfs_new_test_ctx() fails in damon_sysfs_commit_input(),
> param_ctx is leaked because the early return skips the cleanup at the
> out label. Destroy param_ctx before returning.
>
> Fixes: f0c5118ebb0e ("mm/damon/sysfs: catch commit test ctx alloc failure")
> Cc: <stable@xxxxxxxxxxxxxxx> # 6.18.x
> Signed-off-by: Josh Law <objecting@xxxxxxxxxxxxx>
> Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>
> ---
>From next time, please add patch changelog here.
[...]
Sashiko is adding comments [1] similar to those for the previous version of
this patch. I replied [2] on the thread. In short, it is good finding but
orthogonal to this patch, and I will work on it.
[1] https://sashiko.dev/#/patchset/20260320163559.178101-1-objecting@xxxxxxxxxxxxx
[2] https://lore.kernel.org/20260320020056.835-1-sj@xxxxxxxxxx
Thanks,
SJ