linux-yocto/mm/damon
SeongJae Park 04a06b139e mm/damon/sysfs: use dynamically allocated repeat mode damon_call_control
DAMON sysfs interface is using a single global repeat mode
damon_call_control variable for refresh_ms handling, for all DAMON
contexts.  As a result, when there are more than one context, the single
global damon_call_control is unexpectedly over-written (corrupted). 
Particularly the ->link field is overwritten by the multiple contexts and
this can cause a user hangup, and/or a kernel crash.  Fix it by using
dynamically allocated damon_call_control object per DAMON context.

Link: https://lkml.kernel.org/r/20250908201513.60802-3-sj@kernel.org
Link: https://lore.kernel.org/20250904011738.930-1-yunjeong.mun@sk.com [1]
Link: https://lore.kernel.org/20250905035411.39501-1-sj@kernel.org [2]
Fixes: d809a7c64b ("mm/damon/sysfs: implement refresh_ms file internal work")
Signed-off-by: SeongJae Park <sj@kernel.org>
Reported-by: Yunjeong Mun <yunjeong.mun@sk.com>
Closes: https://lore.kernel.org/20250904011738.930-1-yunjeong.mun@sk.com
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-09-13 13:05:36 -07:00
..
tests mm/damon/core: add cleanup_target() ops callback 2025-07-19 18:59:56 -07:00
core.c mm/damon/core: introduce damon_call_control->dealloc_on_cancel 2025-09-13 13:05:36 -07:00
Kconfig mm/damon: introduce DAMON_STAT module 2025-07-09 22:41:55 -07:00
lru_sort.c mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters() 2025-09-03 17:10:36 -07: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: use dynamically allocated repeat mode damon_call_control 2025-09-13 13:05:36 -07:00
vaddr.c mm/damon/vaddr: skip isolating folios already in destination nid 2025-08-02 12:06:09 -07:00