v1
2026-07-18
修复 DAMOS 未初始化字段及测试 · v1
修复DAMON中未初始化的damos->last_applied及kunit测试无效内存访问问题。
原始补丁链接
子 Patch(7)
1/7
mm/damon/core: initialize damos->last_applied
Multiple DAMON regions could exist across a folio. If they fulfill the condition to apply a DAMOS scheme, the scheme could be applied multiple times to the folio. To avoid this, each DAMOS scheme st
2/7
mm/damon/core-kunit: check region count before testing in split_at()
damon_test_split_at() test next region that is assumed to be created by damon_split_region_at() invocation. But the split might fail. In this case, the succeeding test may dereference invalid pointe
3/7
mm/damon/vaddr-kunit: check region count in three_regions test
damon_do_test_apply_three_regions() iterates regions after damon_set_regions() call assuming the function would succeed at setting the number of regions the same to the expected one. It might have fa
4/7
mm/damon/core-kunit: handle region split failure in filter_out()
dasmon_test_filter_out() test checks if damos_filter_match() of an address filter splits the region as expected under a given condition. But, the test continued regardless of the split successes. As
5/7
mm/damon/core-kunit: skip wrong dest walk in commit_dests_for()
damos_test_commit_dests_for() traverse damos action destinations after damos_commit_dests(). It assumes damos_commit_dests() made expected numbers of destinations for source and destination structure
6/7
mm/damon/core-kunit: skip wrong quota goal walk in commit_quota_goals()
damos_test_commit_quota_goals_for() traverses damos quota goals after damos_commit_quota_goals() call. It assumes damos_commit_quota_goals() made expected numbers of goals. It might not. Because th
7/7
mm/damon/core-kunit: skip wrong region walk in commit_target_regions()
damon_test_commit_target_regions_for() traverses expected values array after damon_commit_target_regions() call. It assumes damon_commit_target_regions() made expected number of regions. It might no