From: Thomas Gleixner <tglx@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Link: https://lore.kernel.org/all/877ccx7igo.ffs@tglx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- kernel/time/timekeeping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -2459,7 +2459,7 @@ int do_adjtimex(struct __kernel_timex *t clock_set |= timekeeping_advance(TK_ADV_FREQ); if (clock_set) - clock_was_set(CLOCK_REALTIME); + clock_was_set(CLOCK_SET_WALL); ntp_notify_cmos_timer(); Patches currently in stable-queue which might be from tglx@xxxxxxxxxxxxx are queue-5.15/watchdog-perf-properly-initialize-the-turbo-mode-timestamp-and-rearm-counter.patch queue-5.15/clocksource-scale-the-watchdog-read-retries-automati.patch queue-5.15/tick-broadcast-make-takeover-of-broadcast-hrtimer-reliable.patch queue-5.15/timekeeping-fix-bogus-clock_was_set-invocation-in-do_adjtimex.patch queue-5.15/tick-broadcast-move-per-cpu-pointer-access-into-the-atomic-section.patch queue-5.15/irqchip-imx-irqsteer-handle-runtime-power-management.patch queue-5.15/ntp-safeguard-against-time_constant-overflow.patch queue-5.15/s390-pci-rework-msi-descriptor-walk.patch queue-5.15/ntp-clamp-maxerror-and-esterror-to-operating-range.patch queue-5.15/irqdomain-fixed-unbalanced-fwnode-get-and-put.patch queue-5.15/irqchip-meson-gpio-convert-meson_gpio_irq_controller.patch queue-5.15/x86-mm-fix-pti_clone_pgtable-alignment-assumption.patch queue-5.15/clocksource-fix-brown-bag-boolean-thinko-in-cs_watch.patch queue-5.15/irqchip-mbigen-fix-mbigen-node-address-layout.patch