Skip to content

Commit daa9883

Browse files
author
Al Viro
committed
firewire: switch ioctl_queue_iso to use of copy_from_user()
no point trying to do access_ok() for all those __copy_from_user() at once. Signed-off-by: Al Viro <[email protected]>
1 parent 8f3d9f3 commit daa9883

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/firewire/core-cdev.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,8 +1081,6 @@ static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg)
10811081
return -EINVAL;
10821082

10831083
p = (struct fw_cdev_iso_packet __user *)u64_to_uptr(a->packets);
1084-
if (!access_ok(p, a->size))
1085-
return -EFAULT;
10861084

10871085
end = (void __user *)p + a->size;
10881086
count = 0;
@@ -1120,7 +1118,7 @@ static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg)
11201118
&p->header[transmit_header_bytes / 4];
11211119
if (next > end)
11221120
return -EINVAL;
1123-
if (__copy_from_user
1121+
if (copy_from_user
11241122
(u.packet.header, p->header, transmit_header_bytes))
11251123
return -EFAULT;
11261124
if (u.packet.skip && ctx->type == FW_ISO_CONTEXT_TRANSMIT &&

0 commit comments

Comments
 (0)