aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/firewire/fw-cdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c
index 75388641a7d3..06471302200f 100644
--- a/drivers/firewire/fw-cdev.c
+++ b/drivers/firewire/fw-cdev.c
@@ -722,10 +722,11 @@ static int ioctl_queue_iso(struct client *client, void *buffer)
722 buffer_end = 0; 722 buffer_end = 0;
723 } 723 }
724 724
725 if (!access_ok(VERIFY_READ, request->packets, request->size)) 725 p = (struct fw_cdev_iso_packet __user *)u64_to_uptr(request->packets);
726
727 if (!access_ok(VERIFY_READ, p, request->size))
726 return -EFAULT; 728 return -EFAULT;
727 729
728 p = (struct fw_cdev_iso_packet __user *)u64_to_uptr(request->packets);
729 end = (void __user *)p + request->size; 730 end = (void __user *)p + request->size;
730 count = 0; 731 count = 0;
731 while (p < end) { 732 while (p < end) {