linux/mm/damon
SeongJae Park ec1658f0f9 mm/damon/lru_sort: fix potential memory leak in damon_lru_sort_init()
damon_lru_sort_init() returns an error when damon_select_ops() fails
without freeing 'ctx' which allocated before.  This commit fixes the
potential memory leak by freeing 'ctx' under the situation.

Link: https://lkml.kernel.org/r/20220714170458.49727-1-sj@kernel.org
Fixes: 40e983cca9 ("mm/damon: introduce DAMON-based LRU-lists Sorting")
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-07-17 17:14:27 -07:00
..
core-test.h mm/damon/core-test: add a kunit test case for ops registration 2022-04-29 14:37:00 -07:00
core.c mm/damon/vaddr: move 'damon_set_regions()' to core 2022-05-13 07:20:08 -07:00
dbgfs-test.h mm/damon/dbgfs-test: fix is_target_id() change 2022-03-22 15:57:12 -07:00
dbgfs.c mm/damon/dbgfs: add and use mappings between 'schemes' action inputs and 'damos_action' values 2022-07-03 18:08:42 -07:00
Kconfig mm/damon: introduce DAMON-based LRU-lists Sorting 2022-07-03 18:08:43 -07:00
lru_sort.c mm/damon/lru_sort: fix potential memory leak in damon_lru_sort_init() 2022-07-17 17:14:27 -07:00
Makefile mm/damon: introduce DAMON-based LRU-lists Sorting 2022-07-03 18:08:43 -07:00
ops-common.c mm/damon/schemes: add 'LRU_PRIO' DAMOS action 2022-07-03 18:08:42 -07:00
ops-common.h mm/damon/schemes: add 'LRU_PRIO' DAMOS action 2022-07-03 18:08:42 -07:00
paddr.c mm/damon/schemes: add 'LRU_DEPRIO' action 2022-07-03 18:08:43 -07:00
reclaim.c mm/damon/reclaim: add 'damon_reclaim_' prefix to 'enabled_store()' 2022-07-03 18:08:38 -07:00
sysfs.c mm/damon/schemes: add 'LRU_DEPRIO' action 2022-07-03 18:08:43 -07:00
vaddr-test.h mm/damon/vaddr: remove damon_va_apply_three_regions() 2022-05-13 07:20:08 -07:00
vaddr.c mm: damon: use HPAGE_PMD_SIZE 2022-05-19 14:08:55 -07:00