diff options
-rw-r--r-- | net/compat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/compat.c b/net/compat.c index 6a2f75fb3f45..e1a56ade803b 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -758,9 +758,13 @@ asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, | |||
758 | { | 758 | { |
759 | int datagrams; | 759 | int datagrams; |
760 | struct timespec ktspec; | 760 | struct timespec ktspec; |
761 | struct compat_timespec __user *utspec = | 761 | struct compat_timespec __user *utspec; |
762 | (struct compat_timespec __user *)timeout; | ||
763 | 762 | ||
763 | if (timeout == NULL) | ||
764 | return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, | ||
765 | flags | MSG_CMSG_COMPAT, NULL); | ||
766 | |||
767 | utspec = (struct compat_timespec __user *)timeout; | ||
764 | if (get_user(ktspec.tv_sec, &utspec->tv_sec) || | 768 | if (get_user(ktspec.tv_sec, &utspec->tv_sec) || |
765 | get_user(ktspec.tv_nsec, &utspec->tv_nsec)) | 769 | get_user(ktspec.tv_nsec, &utspec->tv_nsec)) |
766 | return -EFAULT; | 770 | return -EFAULT; |