]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "posix-cpu-timers: Force next expiration recalc after itimer reset"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Sep 2021 08:51:42 +0000 (10:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Sep 2021 10:30:15 +0000 (12:30 +0200)
This reverts commit 75ef6fb512dde4c94686e6cb06498b64dfcace32 which is
commit 406dd42bd1ba0c01babf9cde169bb319e52f6147 upstream.

It is reported to cause regressions.  A proposed fix has been posted,
but it is not in a released kernel yet.  So just revert this from the
stable release so that the bug is fixed.  If it's really needed we can
add it back in in a future release.

Link: https://lore.kernel.org/r/87ilz1pwaq.fsf@wylie.me.uk
Reported-by: "Alan J. Wylie" <alan@wylie.me.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/time/posix-cpu-timers.c

index a9f8d25220b1a41d93299884d25f306d29b5a5a9..aa52fc85dbcbf481f74cba6b464da2e0fa5e718c 100644 (file)
@@ -1346,6 +1346,8 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid,
                        }
                }
 
+               if (!*newval)
+                       return;
                *newval += now;
        }