Skip to content

Commit aca1dc0

Browse files
KAGA-KOKOFrederic Weisbecker
authored andcommitted
posix-timers: Clear overrun in common_timer_set()
Keeping the overrun count of the previous setup around is just wrong. The new setting has nothing to do with the previous one and has to start from a clean slate. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]>
1 parent bfa408f commit aca1dc0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/time/posix-timers.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ int common_timer_set(struct k_itimer *timr, int flags,
881881
timr->it_requeue_pending = (timr->it_requeue_pending + 2) &
882882
~REQUEUE_PENDING;
883883
timr->it_overrun_last = 0;
884+
timr->it_overrun = -1LL;
884885

885886
/* Switch off the timer when it_value is zero */
886887
if (!new_setting->it_value.tv_sec && !new_setting->it_value.tv_nsec)

0 commit comments

Comments
 (0)