Skip to content

Commit

Permalink
timekeeping: Add missing update call in timekeeping_resume()
Browse files Browse the repository at this point in the history
The leap second rework unearthed another issue of inconsistent data.

On timekeeping_resume() the timekeeper data is updated, but nothing
calls timekeeping_update(), so now the update code in the timer
interrupt sees stale values.

This has been the case before those changes, but then the timer
interrupt was using stale data as well so this went unnoticed for quite
some time.

Add the missing update call, so all the data is consistent everywhere.

Reported-by: Andreas Schwab <[email protected]>
Reported-and-tested-by: "Rafael J. Wysocki" <[email protected]>
Reported-and-tested-by: Martin Steigerwald <[email protected]>
Cc: LKML <[email protected]>
Cc: Linux PM list <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>,
Cc: Prarit Bhargava <[email protected]>
Cc: [email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
KAGA-KOKO authored and torvalds committed Jul 16, 2012
1 parent 33d519f commit 3e99713
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ static void timekeeping_resume(void)
timekeeper.clock->cycle_last = timekeeper.clock->read(timekeeper.clock);
timekeeper.ntp_error = 0;
timekeeping_suspended = 0;
timekeeping_update(false);
write_sequnlock_irqrestore(&timekeeper.lock, flags);

touch_softlockup_watchdog();
Expand Down

0 comments on commit 3e99713

Please sign in to comment.