linux/mm/damon
SeongJae Park ba236520ae mm/damon/sysfs: dealloc commit test ctx always
commit 139e7a572a upstream.

The damon_ctx for testing online DAMON parameters commit inputs is
deallocated only when the test fails.  This means memory is leaked for
every successful online DAMON parameters commit.  Fix the leak by always
deallocating it.

Link: https://lkml.kernel.org/r/20251003201455.41448-3-sj@kernel.org
Fixes: 4c9ea539ad ("mm/damon/sysfs: validate user inputs from damon_sysfs_commit_input()")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>	[6.15+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-29 14:10:25 +01:00
..
tests mm/damon/core: add cleanup_target() ops callback 2025-07-19 18:59:56 -07:00
core.c mm/damon/core: fix potential memory leak by cleaning ops_filter in damon_destroy_scheme 2025-10-29 14:10:25 +01:00
Kconfig mm/damon: introduce DAMON_STAT module 2025-07-09 22:41:55 -07:00
lru_sort.c mm/damon/lru_sort: use param_ctx for damon_attrs staging 2025-10-19 16:37:38 +02:00
Makefile mm/damon: introduce DAMON_STAT module 2025-07-09 22:41:55 -07:00
modules-common.c mm/damon: s/primitives/code/ on comments 2025-06-05 21:55:41 -07:00
modules-common.h mm/damon: s/primitives/code/ on comments 2025-06-05 21:55:41 -07:00
ops-common.c mm/damon/ops-common: ignore migration request to invalid nodes 2025-07-24 19:12:43 -07:00
ops-common.h mm/damon: move folio filtering from paddr to ops-common 2025-07-19 18:59:50 -07:00
paddr.c mm/damon: move folio filtering from paddr to ops-common 2025-07-19 18:59:50 -07:00
reclaim.c mm/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters() 2025-09-03 17:10:37 -07:00
stat.c mm/damon/stat: use damon_call() repeat mode instead of damon_callback 2025-07-19 18:59:54 -07:00
sysfs-common.c mm/damon: s/primitives/code/ on comments 2025-06-05 21:55:41 -07:00
sysfs-common.h mm/damon: s/primitives/code/ on comments 2025-06-05 21:55:41 -07:00
sysfs-schemes.c mm/damon/sysfs-schemes: put damos dests dir after removing its files 2025-08-19 16:35:57 -07:00
sysfs.c mm/damon/sysfs: dealloc commit test ctx always 2025-10-29 14:10:25 +01:00
vaddr.c mm/damon/vaddr: do not repeat pte_offset_map_lock() until success 2025-10-19 16:37:38 +02:00