Skip to content
  • Thomas Gleixner's avatar
    hrtimer: prevent negative expiry value after clock_was_set() · b0a9b511
    Thomas Gleixner authored
    
    
    Impact: prevent false positive WARN_ON() in clockevents_program_event()
    
    clock_was_set() changes the base->offset of CLOCK_REALTIME and
    enforces the reprogramming of the clockevent device to expire timers
    which are based on CLOCK_REALTIME. If the clock change is large enough
    then the subtraction of the timer expiry value and base->offset can
    become negative which triggers the warning in
    clockevents_program_event().
    
    Check the subtraction result and set a negative value to 0.
    
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    b0a9b511