]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/damon/core: use time_before() for next_apply_sis
authorSeongJae Park <sj@kernel.org>
Sat, 7 Mar 2026 19:49:13 +0000 (11:49 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 5 Apr 2026 20:53:22 +0000 (13:53 -0700)
commitf05e253637837b603682173ed6bd0bc873dc0496
treef886ac073a08248f53d9f77c8a2961226a64bbb9
parent7e6c650fdbdb76bb6db74d3af025b7327707e6a0
mm/damon/core: use time_before() for next_apply_sis

damon_ctx->passed_sample_intervals and damos->next_apply_sis are unsigned
long, and compared via normal comparison operators.  It is unsafe from
overflow.  Use time_before(), which is safe from overflow when correctly
used, instead.

Link: https://lkml.kernel.org/r/20260307194915.203169-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c