]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
posix-timers: Clear overrun in common_timer_set()
authorThomas Gleixner <tglx@linutronix.de>
Mon, 10 Jun 2024 16:42:27 +0000 (18:42 +0200)
committerFrederic Weisbecker <frederic@kernel.org>
Mon, 29 Jul 2024 19:57:35 +0000 (21:57 +0200)
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 <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
kernel/time/posix-timers.c

index 056966b9d7da032598b2ecfe332ccfd4e6c53bad..53a993e4dbfad35eea1b24fe20d1e3667758e919 100644 (file)
@@ -881,6 +881,7 @@ int common_timer_set(struct k_itimer *timr, int flags,
        timr->it_requeue_pending = (timr->it_requeue_pending + 2) &
                ~REQUEUE_PENDING;
        timr->it_overrun_last = 0;
+       timr->it_overrun = -1LL;
 
        /* Switch off the timer when it_value is zero */
        if (!new_setting->it_value.tv_sec && !new_setting->it_value.tv_nsec)