diff options
| author | Longlong Xia <xialonglong@kylinos.cn> | 2026-08-26 16:21:50 +0800 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@kernel.org> | 2026-09-17 15:42:03 -0700 |
| commit | 4c714f015d9ecc37d7a330b31822ccbcaff5ddc9 (patch) | |
| tree | a3ee522ab57087db75ec649b1323fa39b26d2f5b /scripts/Makefile.thinlto | |
| parent | b3eb16109ae108c3464b0f5f8850ca4b6085561a (diff) | |
| download | linux-4c714f015d9ecc37d7a330b31822ccbcaff5ddc9.tar.gz linux-4c714f015d9ecc37d7a330b31822ccbcaff5ddc9.zip | |
rcu: fix shrink budget underflow in lazy_rcu_shrink_scan
The lazy RCU shrinker decremented sc->nr_to_scan (unsigned long)
and then tested the result with <= 0. When a single CPU's lazy
callback count exceeds the remaining budget, the subtraction wraps
to a large positive value and the <= 0 comparison, which is
equivalent to == 0 for an unsigned type, never fires again. The
scan loop then iterates through every nocb CPU instead of honouring
the reclaim budget.
Accumulate into count and stop once count >= nr_to_scan.
Fixes: c945b4da7a448 ("rcu: Shrinker for lazy rcu")
Assisted-by: Zcode:GLM-5.2
Signed-off-by: Longlong Xia <xialonglong@kylinos.cn>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
