[RFC PATCH 0/2] mm/damon/sysfs-schemes: fix use-after-free for [memcg_]path

SeongJae Park
2026-04-22T14:35:11Z

Reads of 'path' and 'memcg_path' files in DAMON sysfs interface could
race with their writes, results in use-after-free. Fix those.

SeongJae Park (2):
mm/damon/sysfs-schemes: protect memcg_path kfree() with
damon_sysfs_lock
mm/damon/sysfs-schemes: protect path kfree() with damon_sysfs_lock

mm/damon/sysfs-schemes.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)

base-commit: 0d45806f3a75bf53e59475b0e56be324f650ab09
--
2.47.3