Skip to content
  • Arjen Hiemstra's avatar
    CPU Plugin: Prevent integer overflow of total usage · 99670f3a
    Arjen Hiemstra authored and Nate Graham's avatar Nate Graham committed
    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)
    99670f3a