]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex()
authorThomas Gleixner <tglx@linutronix.de>
Sat, 3 Aug 2024 15:07:51 +0000 (17:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:30 +0000 (15:34 +0200)
commite689fcf08f3e5d383df5759ee6f64ffc173d2143
tree1e66ba128ef46c9dd916bbf0e59a44370a2d2721
parent61a050c54d7f6e9e496d014df9e7eee5c361463a
timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex()

commit 5916be8a53de6401871bdd953f6c60237b47d6d3 upstream.

The addition of the bases argument to clock_was_set() fixed up all call
sites correctly except for do_adjtimex(). This uses CLOCK_REALTIME
instead of CLOCK_SET_WALL as argument. CLOCK_REALTIME is 0.

As a result the effect of that clock_was_set() notification is incomplete
and might result in timers expiring late because the hrtimer code does
not re-evaluate the affected clock bases.

Use CLOCK_SET_WALL instead of CLOCK_REALTIME to tell the hrtimers code
which clock bases need to be re-evaluated.

Fixes: 17a1b8826b45 ("hrtimer: Add bases argument to clock_was_set()")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/877ccx7igo.ffs@tglx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/time/timekeeping.c