mm/damon/reclaim: fix addr_unit validation and age truncation
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm/damon/reclaim: reject non-power-of-2 addr_unitmm/ | +1 | 1 reply | |
| 2/2 | mm/damon/reclaim: fix min_age_region truncation from unsigned long to unsigned intmm/ | +2 | 1 reply |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | SeongJae Park |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] mm/damon/reclaim: fix addr_unit validation and age truncation
Two small fixes for mm/damon/reclaim.c:
Patch 1 rejects non-power-of-2 addr_unit values in the store function. Without this, DAMON_MIN_REGION_SZ / addr_unit produces a non-power-of-2 min_region_sz that causes undefined behavior in ALIGN() before damon_commit_ctx() gets a chance to reject it. Note that mm/damon/lru_sort.c has the same pattern and likely needs a similar fix.
Patch 2 clamps the min_age / aggr_interval result to UINT_MAX to prevent silent truncation when assigning to the unsigned int min_age_region field.
Josh Law (2):
mm/damon/reclaim: reject non-power-of-2 addr_unit mm/damon/reclaim: fix min_age_region truncation from unsigned long to
unsigned int
mm/damon/reclaim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1