From: Al Viro Date: Sun, 14 Oct 2007 18:34:40 +0000 (+0100) Subject: fw-cdev __user annotations X-Git-Tag: v2.6.24-rc1~1317 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ccc9147f6a063c42fef67acff34de18435a4a6b;p=linux-2.6 fw-cdev __user annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index 75388641a7..0647130220 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) buffer_end = 0; } - if (!access_ok(VERIFY_READ, request->packets, request->size)) + p = (struct fw_cdev_iso_packet __user *)u64_to_uptr(request->packets); + + if (!access_ok(VERIFY_READ, p, request->size)) return -EFAULT; - p = (struct fw_cdev_iso_packet __user *)u64_to_uptr(request->packets); end = (void __user *)p + request->size; count = 0; while (p < end) {