Skip to content

Commit

Permalink
timekeeping: Another fix to the VSYSCALL_OLD update_vsyscall
Browse files Browse the repository at this point in the history
Benjamin Herrenschmidt pointed out that I further missed modifying
update_vsyscall after the wall_to_mono value was changed to a
timespec64.  This causes issues on powerpc32, which expects a 32bit
timespec.

This patch fixes the problem by properly converting from a timespec64 to
a timespec before passing the value on to the arch-specific vsyscall
logic.

[ Thomas is currently on vacation, but reviewed it and wanted me to send
  this fix on to you directly. ]

Cc: LKML <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Reported-by: Benjamin Herrenschmidt <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
johnstultz-work authored and torvalds committed Aug 14, 2014
1 parent f2937e4 commit 0680eb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,11 @@ EXPORT_SYMBOL_GPL(ktime_get_mono_fast_ns);

static inline void update_vsyscall(struct timekeeper *tk)
{
struct timespec xt;
struct timespec xt, wm;

xt = timespec64_to_timespec(tk_xtime(tk));
update_vsyscall_old(&xt, &tk->wall_to_monotonic, tk->tkr.clock, tk->tkr.mult,
wm = timespec64_to_timespec(tk->wall_to_monotonic);
update_vsyscall_old(&xt, &wm, tk->tkr.clock, tk->tkr.mult,
tk->tkr.cycle_last);
}

Expand Down

0 comments on commit 0680eb1

Please sign in to comment.