]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
s390/time: cast tv_nsec to u64 prior to shift in update_vsyscall
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 20 May 2014 15:21:35 +0000 (17:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2014 03:11:54 +0000 (20:11 -0700)
commit b6f4296279ab3ada554d993d12844272fd86b36a upstream.

Analog to git commit 28b92e09e25bdc0ae864b22eacf195a74f861389
first cast tk->wall_to_monotonic.tv_nsec to u64 before doing
the shift with tk->shift to avoid loosing relevant bits on a
32-bit kernel.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kernel/time.c

index dd95f1631621722ca9d35a5d67269b152cb630d2..a80190be6e8302606b910964ea4c722e70b69e68 100644 (file)
@@ -226,7 +226,7 @@ void update_vsyscall(struct timekeeper *tk)
        vdso_data->wtom_clock_sec =
                tk->xtime_sec + tk->wall_to_monotonic.tv_sec;
        vdso_data->wtom_clock_nsec = tk->xtime_nsec +
-               + (tk->wall_to_monotonic.tv_nsec << tk->shift);
+               + ((u64) tk->wall_to_monotonic.tv_nsec << tk->shift);
        nsecps = (u64) NSEC_PER_SEC << tk->shift;
        while (vdso_data->wtom_clock_nsec >= nsecps) {
                vdso_data->wtom_clock_nsec -= nsecps;