From: SeongJae Park <sj@kernel.org>
To: Quanmin Yan <yanquanmin1@huawei.com>
Cc: SeongJae Park <sj@kernel.org>,
akpm@linux-foundation.org, damon@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
wangkefeng.wang@huawei.com, zuoze1@huawei.com
Subject: Re: [RFC PATCH 2/2] mm/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters()
Date: Tue, 26 Aug 2025 07:34:03 -0700 [thread overview]
Message-ID: <20250826143404.54232-1-sj@kernel.org> (raw)
In-Reply-To: <20250826033653.1208227-3-yanquanmin1@huawei.com>
On Tue, 26 Aug 2025 11:36:53 +0800 Quanmin Yan <yanquanmin1@huawei.com> wrote:
> When creating a new scheme of DAMON_RECLAIM, the calculation
> of 'min_age_region' uses 'aggr_interval' as the divisor, which
> may lead to division-by-zero errors. Fix it by directly returning
> -EINVAL when such a case occurs.
Nice catch, thank you for this patch!
>
> Fixes: f5a79d7c0c87 ("mm/damon: introduce struct damos_access_pattern")
Let's add Cc: stable@
> Signed-off-by: Quanmin Yan <yanquanmin1@huawei.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
next prev parent reply other threads:[~2025-08-26 14:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 3:36 [RFC PATCH 0/2] mm/damon: void divide-by-zero in DAMON module's parameters application Quanmin Yan
2025-08-26 3:36 ` [RFC PATCH 1/2] mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters() Quanmin Yan
2025-08-26 14:32 ` SeongJae Park
2025-08-26 3:36 ` [RFC PATCH 2/2] mm/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters() Quanmin Yan
2025-08-26 14:34 ` SeongJae Park [this message]
2025-08-26 14:36 ` [RFC PATCH 0/2] mm/damon: void divide-by-zero in DAMON module's parameters application SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250826143404.54232-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wangkefeng.wang@huawei.com \
--cc=yanquanmin1@huawei.com \
--cc=zuoze1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).