mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
DAMON debugfs interface iterates current monitoring targets in
'dbgfs_target_ids_read()' while holding the corresponding
'kdamond_lock'. However, it also destructs the monitoring targets in
'dbgfs_before_terminate()' without holding the lock. This can result in
a use_after_free bug. This commit avoids the race by protecting the
destruction with the corresponding 'kdamond_lock'.
Link: https://lkml.kernel.org/r/20211221094447.2241-1-sj@kernel.org
Reported-by: Sangwoo Bae <sangwoob@amazon.com>
Fixes:
|
||
|---|---|---|
| .. | ||
| core-test.h | ||
| core.c | ||
| dbgfs-test.h | ||
| dbgfs.c | ||
| Kconfig | ||
| Makefile | ||
| paddr.c | ||
| prmtv-common.c | ||
| prmtv-common.h | ||
| reclaim.c | ||
| vaddr-test.h | ||
| vaddr.c | ||