From: Thomas Gleixner Date: Mon, 10 Jun 2024 16:42:27 +0000 (+0200) Subject: posix-timers: Clear overrun in common_timer_set() X-Git-Tag: v6.12-rc1~194^2~11^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aca1dc0ce128a9b12640c39c0e035266bf9c9fa5;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) --- diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 056966b9d7da0..53a993e4dbfad 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)