Merge branch 'stable/for-jens-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / net / socket.c
index e7793f5..a1bd161 100644 (file)
@@ -2168,7 +2168,8 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
        struct mmsghdr __user *entry;
        struct compat_mmsghdr __user *compat_entry;
        struct msghdr msg_sys;
-       struct timespec end_time;
+       struct timespec64 end_time;
+       struct timespec64 timeout64;
 
        if (timeout &&
            poll_select_set_timeout(&end_time, timeout->tv_sec,
@@ -2220,8 +2221,9 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
                        flags |= MSG_DONTWAIT;
 
                if (timeout) {
-                       ktime_get_ts(timeout);
-                       *timeout = timespec_sub(end_time, *timeout);
+                       ktime_get_ts64(&timeout64);
+                       *timeout = timespec64_to_timespec(
+                                       timespec64_sub(end_time, timeout64));
                        if (timeout->tv_sec < 0) {
                                timeout->tv_sec = timeout->tv_nsec = 0;
                                break;