]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/compat.c
HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges
[linux.git] / net / compat.c
index 3b2105f6549de490182dbebeddf0e3eca25b37e2..47a614b370cd3e4b7039875e3389477415701408 100644 (file)
@@ -812,21 +812,21 @@ COMPAT_SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, buf, compat_size_t, len
 
 static int __compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
                                 unsigned int vlen, unsigned int flags,
-                                struct compat_timespec __user *timeout)
+                                struct old_timespec32 __user *timeout)
 {
        int datagrams;
-       struct timespec ktspec;
+       struct timespec64 ktspec;
 
        if (timeout == NULL)
                return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
                                      flags | MSG_CMSG_COMPAT, NULL);
 
-       if (compat_get_timespec(&ktspec, timeout))
+       if (compat_get_timespec64(&ktspec, timeout))
                return -EFAULT;
 
        datagrams = __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
                                   flags | MSG_CMSG_COMPAT, &ktspec);
-       if (datagrams > 0 && compat_put_timespec(&ktspec, timeout))
+       if (datagrams > 0 && compat_put_timespec64(&ktspec, timeout))
                datagrams = -EFAULT;
 
        return datagrams;
@@ -834,7 +834,7 @@ static int __compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
 
 COMPAT_SYSCALL_DEFINE5(recvmmsg, int, fd, struct compat_mmsghdr __user *, mmsg,
                       unsigned int, vlen, unsigned int, flags,
-                      struct compat_timespec __user *, timeout)
+                      struct old_timespec32 __user *, timeout)
 {
        return __compat_sys_recvmmsg(fd, mmsg, vlen, flags, timeout);
 }