diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-05-20 17:21:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-30 20:11:54 -0700 |
commit | 1187571b73e16f18fd04ccf2bcf307a04c725895 (patch) | |
tree | 8bfb3f3048449170e70c13c5c2ea53589f05633a /arch/s390 | |
parent | 7c50a27b68f395fee0c45cb769b4c8546dcac7a4 (diff) | |
download | lwn-1187571b73e16f18fd04ccf2bcf307a04c725895.tar.gz lwn-1187571b73e16f18fd04ccf2bcf307a04c725895.zip |
s390/time: cast tv_nsec to u64 prior to shift in update_vsyscall
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>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index dd95f1631621..a80190be6e83 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -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; |