diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-04-18 07:42:25 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2018-08-29 09:42:24 -0400 |
commit | c2e6c8567acdba8db1055b242c34ceb123c6a253 (patch) | |
tree | c68fc623710d64f681bcd1b90965f69a757e64ba /net/compat.c | |
parent | 474b9c777b20b8340a6ee0f7ba6ebbd6a4bf47e2 (diff) |
y2038: socket: Change recvmmsg to use __kernel_timespec
This converts the recvmmsg() system call in all its variations to use
'timespec64' internally for its timeout, and have a __kernel_timespec64
argument in the native entry point. This lets us change the type to use
64-bit time_t at a later point while using the 32-bit compat system call
emulation for existing user space.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'net/compat.c')
-rw-r--r-- | net/compat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/compat.c b/net/compat.c index 2ef160876bc1..47a614b370cd 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -815,18 +815,18 @@ static int __compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, | |||
815 | struct old_timespec32 __user *timeout) | 815 | struct old_timespec32 __user *timeout) |
816 | { | 816 | { |
817 | int datagrams; | 817 | int datagrams; |
818 | struct timespec ktspec; | 818 | struct timespec64 ktspec; |
819 | 819 | ||
820 | if (timeout == NULL) | 820 | if (timeout == NULL) |
821 | return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, | 821 | return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, |
822 | flags | MSG_CMSG_COMPAT, NULL); | 822 | flags | MSG_CMSG_COMPAT, NULL); |
823 | 823 | ||
824 | if (compat_get_timespec(&ktspec, timeout)) | 824 | if (compat_get_timespec64(&ktspec, timeout)) |
825 | return -EFAULT; | 825 | return -EFAULT; |
826 | 826 | ||
827 | datagrams = __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, | 827 | datagrams = __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, |
828 | flags | MSG_CMSG_COMPAT, &ktspec); | 828 | flags | MSG_CMSG_COMPAT, &ktspec); |
829 | if (datagrams > 0 && compat_put_timespec(&ktspec, timeout)) | 829 | if (datagrams > 0 && compat_put_timespec64(&ktspec, timeout)) |
830 | datagrams = -EFAULT; | 830 | datagrams = -EFAULT; |
831 | 831 | ||
832 | return datagrams; | 832 | return datagrams; |