Skip to content

Commit 5916be8

Browse files
committed
timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex()
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: 17a1b88 ("hrtimer: Add bases argument to clock_was_set()") Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/all/877ccx7igo.ffs@tglx
1 parent 06c03c8 commit 5916be8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/time/timekeeping.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2606,7 +2606,7 @@ int do_adjtimex(struct __kernel_timex *txc)
26062606
clock_set |= timekeeping_advance(TK_ADV_FREQ);
26072607

26082608
if (clock_set)
2609-
clock_was_set(CLOCK_REALTIME);
2609+
clock_was_set(CLOCK_SET_WALL);
26102610

26112611
ntp_notify_cmos_timer();
26122612

0 commit comments

Comments
 (0)