Skip to content

Commit b6f4296

Browse files
author
Martin Schwidefsky
committed
s390/time: cast tv_nsec to u64 prior to shift in update_vsyscall
Analog to git commit 28b92e0 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. Cc: stable@vger.kernel.org # 3.13+ Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 94414ca commit b6f4296

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/s390/kernel/time.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void update_vsyscall(struct timekeeper *tk)
226226
vdso_data->wtom_clock_sec =
227227
tk->xtime_sec + tk->wall_to_monotonic.tv_sec;
228228
vdso_data->wtom_clock_nsec = tk->xtime_nsec +
229-
+ (tk->wall_to_monotonic.tv_nsec << tk->shift);
229+
+ ((u64) tk->wall_to_monotonic.tv_nsec << tk->shift);
230230
nsecps = (u64) NSEC_PER_SEC << tk->shift;
231231
while (vdso_data->wtom_clock_nsec >= nsecps) {
232232
vdso_data->wtom_clock_nsec -= nsecps;

0 commit comments

Comments
 (0)