Skip to content
Commit 99670f3a authored by Arjen Hiemstra's avatar Arjen Hiemstra Committed by Nate Graham
Browse files

CPU Plugin: Prevent integer overflow of total usage

In some cases, the values we read from the system can result in a
negative difference to the previous values. This was already guarded
partially, but only for system/user/wait usage. Total usage would still
be able to go negative, resulting in overflow of the total usage.

Instead, ensure that all the differences are always at least 0, so if we
add things together we aren't adding negatives.

BUG: 448626
FIXED-IN: 5.24.1


(cherry picked from commit f3f509fc)
parent ac910fc4
Pipeline #133104 passed with stage
in 45 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment