v1
2026-07-15
修复DAMON死循环与空指针等bug · v1
修复 DAMON 中无限循环、空指针解引用及监控结果退化等多个 bug。
原始补丁链接
子 Patch(5)
1/5
mm/damon/core: avoid infinite kdamond_merge_regions() internal loop
Due to online parameter update like events, the number of DAMON regions could be higher than the user-set upper limit. kdamond_merge_regions() repeats merge regions until the number meets the limit,
2/5
mm/damon/tests/core-kunit: catch test failure in test_merge_regions_of()
KUNIT_EXPECT_EQ() does not abort the execution of test code when the expectation is not met. But damon_test_merge_regions_of() code after its initial KUNIT_EXPECT_EQ() call assumes the expectation is
3/5
mm/damon/vaddr: drop last same folio access check optimization
The optimization can race when multiple kdamonds are running. Meanwhile, the impact of the optimization is quite doubtful. Just remove it. The user impact of the issue should be quite trivial. Afte
4/5
mm/damon/paddr: drop last same folio access check reuse optimization
It can race when multiple kdamonds are being used. The problem from the race is doubtful, but the gain from the optimization is also doubtful. Simply drop the optimization in favor of code simplicity
5/5
mm/damon/sysfs: read ops_id only once
damon_sysfs_apply_inputs() reads ops_id twice. It could race with ops_id_store(). As a result, the min_region_sz could wrongly be set up. Read it once. The user impact is trivial. Sane users ain’t