]> Git Repo - linux.git/commitdiff
firewire: switch ioctl_queue_iso to use of copy_from_user()
authorAl Viro <[email protected]>
Tue, 18 Feb 2020 20:40:40 +0000 (15:40 -0500)
committerAl Viro <[email protected]>
Thu, 23 Apr 2020 14:51:05 +0000 (10:51 -0400)
no point trying to do access_ok() for all those __copy_from_user()
at once.

Signed-off-by: Al Viro <[email protected]>
drivers/firewire/core-cdev.c

index 6e291d8f3a278556c8d0349b7aed9c8d9e67db9c..c7ea4f2d5ca6967cdd2b9b7e9eb20e8d851b4d7c 100644 (file)
@@ -1081,8 +1081,6 @@ static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg)
                return -EINVAL;
 
        p = (struct fw_cdev_iso_packet __user *)u64_to_uptr(a->packets);
-       if (!access_ok(p, a->size))
-               return -EFAULT;
 
        end = (void __user *)p + a->size;
        count = 0;
@@ -1120,7 +1118,7 @@ static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg)
                        &p->header[transmit_header_bytes / 4];
                if (next > end)
                        return -EINVAL;
-               if (__copy_from_user
+               if (copy_from_user
                    (u.packet.header, p->header, transmit_header_bytes))
                        return -EFAULT;
                if (u.packet.skip && ctx->type == FW_ISO_CONTEXT_TRANSMIT &&
This page took 0.059875 seconds and 4 git commands to generate.