The following commit has been merged into the timers/core branch of tip: Commit-ID: aca1dc0ce128a9b12640c39c0e035266bf9c9fa5 Gitweb: https://git.kernel.org/tip/aca1dc0ce128a9b12640c39c0e035266bf9c9fa5 Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx> AuthorDate: Mon, 10 Jun 2024 18:42:27 +02:00 Committer: Frederic Weisbecker <frederic@xxxxxxxxxx> CommitterDate: Mon, 29 Jul 2024 21:57:35 +02:00 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 <tglx@xxxxxxxxxxxxx> Signed-off-by: Frederic Weisbecker <frederic@xxxxxxxxxx> Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> --- kernel/time/posix-timers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 056966b..53a993e 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -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)