diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-06-10 18:42:27 +0200 |
---|---|---|
committer | Frederic Weisbecker <frederic@kernel.org> | 2024-07-29 21:57:35 +0200 |
commit | aca1dc0ce128a9b12640c39c0e035266bf9c9fa5 (patch) | |
tree | 57dba48e281aef6de1db277f494f1caab53c5505 /kernel/time/posix-timers.c | |
parent | posix-timers: Retrieve interval in common timer_settime() code (diff) | |
download | linux-aca1dc0ce128a9b12640c39c0e035266bf9c9fa5.tar.xz linux-aca1dc0ce128a9b12640c39c0e035266bf9c9fa5.zip |
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@linutronix.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to '')
-rw-r--r-- | kernel/time/posix-timers.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 056966b9d7da..53a993e4dbfa 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) |