summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator
diff options
context:
space:
mode:
authorEduard Zingerman <eddyz87@gmail.com>2026-10-26 16:38:24 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-10-27 16:26:21 +0000
commit86d654957d40111ec158aae38d7f7b0bc119533c (patch)
treea12cbf13981477a7f47ee63b04026bb8d8c3e6b1 /rust/kernel/alloc/allocator
parent5dd32c8c108226912054e293ee306c98c283c512 (diff)
bpf: Check the iteration count before the predicted exit value
The comment before `total_change` computation: /* * compute_backedge_taken_count() guarantees that 'total_change' * does not overflow in 64-bit domain. */ total_change = initial + step * backedge_taken_count; Is not true before the check: if (backedge_taken_count >= U32_MAX - 1) return false; Move the check before `total_change` computation in order to reconcile the code with comments. Old position is not a bug the check was performed either way. Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261026-scev-simpler-clamp-v2-4-f373aec9825f@gmail.com
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions