timekeeping: Another fix to the VSYSCALL_OLD update_vsyscall
authorJohn Stultz <john.stultz@linaro.org>
Wed, 13 Aug 2014 19:47:14 +0000 (12:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Aug 2014 17:04:11 +0000 (11:04 -0600)
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 <linux-kernel@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/time/timekeeping.c

index f36b028..fb4a9c2 100644 (file)
@@ -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);
 }