mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] timekeeping: Another fix to the VSYSCALL_OLD update_vsyscall
@ 2014-08-13 19:47 John Stultz
  0 siblings, 0 replies; 3+ messages in thread
From: John Stultz @ 2014-08-13 19:47 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: John Stultz, LKML, Thomas Gleixner, Ingo Molnar, Benjamin Herrenschmidt

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

thanks
-john

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.

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>
---
 kernel/time/timekeeping.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index f36b028..fb4a9c2 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -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);
 }
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH] timekeeping: Another fix to the VSYSCALL_OLD update_vsyscall
@ 2014-08-12 15:52 John Stultz
  2014-08-13  0:20 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: John Stultz @ 2014-08-12 15:52 UTC (permalink / raw)
  To: LKML; +Cc: John Stultz, Thomas Gleixner, Ingo Molnar, Benjamin Herrenschmidt

Benjamin Herrenschmidt pointed out that I firuther 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 my properly converting from
a timespec64 to a timespec before passing the value on to
the arch-specific vsyscall logic.

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>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 kernel/time/timekeeping.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index f36b028..fb4a9c2 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -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);
 }
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-13 19:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-13 19:47 [PATCH] timekeeping: Another fix to the VSYSCALL_OLD update_vsyscall John Stultz
  -- strict thread matches above, loose matches on Subject: below --
2014-08-12 15:52 John Stultz
2014-08-13  0:20 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®