]> git.baikalelectronics.ru Git - kernel.git/commit
timekeeping: Increment clock_was_set_seq in timekeeping_init()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 16 Oct 2015 13:50:22 +0000 (15:50 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 16 Oct 2015 13:50:22 +0000 (15:50 +0200)
commit98e9899a5962c8ddcaddc42de2b8189d60e82002
treeeb7e2ced8a9f8275d65e3b4ac9f8b66d5f0af023
parentd4b7198c826c2623452ec881d49138c5c732e01c
timekeeping: Increment clock_was_set_seq in timekeeping_init()

timekeeping_init() can set the wall time offset, so we need to
increment the clock_was_set_seq counter. That way hrtimers will pick
up the early offset immediately. Otherwise on a machine which does not
set wall time later in the boot process the hrtimer offset is stale at
0 and wall time timers are going to expire with a delay of 45 years.

Fixes: c69320a6f8ec "hrtimer: Make offset update smarter"
Reported-and-tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Stefan Liebler <stli@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
kernel/time/timekeeping.c