[PATCH 0/2] mm/damon: void divide-by-zero in DAMON module's parameters application

Quanmin Yan posted 2 patches 1 month, 1 week ago
mm/damon/lru_sort.c | 5 +++++
mm/damon/reclaim.c  | 5 +++++
2 files changed, 10 insertions(+)
[PATCH 0/2] mm/damon: void divide-by-zero in DAMON module's parameters application
Posted by Quanmin Yan 1 month, 1 week ago
DAMON's RECLAIM or LRU_SORT modules perform no validation on
user-configured parameters during application, which may lead
to division-by-zero errors.

Avoid the divide-by-zero by adding validation checks when DAMON
modules attempt to apply the parameters.

Changes from RFC v1
(https://lore.kernel.org/all/20250826033653.1208227-1-yanquanmin1@huawei.com/)
- No code changes.
  - Drop RFC tag.
  - Add 'Cc: stable@' tags to each patch.

Quanmin Yan (2):
  mm/damon/lru_sort: avoid divide-by-zero in
    damon_lru_sort_apply_parameters()
  mm/damon/reclaim: avoid divide-by-zero in
    damon_reclaim_apply_parameters()

 mm/damon/lru_sort.c | 5 +++++
 mm/damon/reclaim.c  | 5 +++++
 2 files changed, 10 insertions(+)

-- 
2.43.0
Re: [PATCH 0/2] mm/damon: void divide-by-zero in DAMON module's parameters application
Posted by SeongJae Park 1 month ago
A trivial typo on the subject: "s/void/avoid/".  Andrew, could you please fix
that when you pick this in mm tree?  Let us know if we can help.


Thanks,
SJ

[...]