From 1ccc9147f6a063c42fef67acff34de18435a4a6b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 14 Oct 2007 19:34:40 +0100 Subject: fw-cdev __user annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/firewire/fw-cdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index 75388641a7d..06471302200 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) { -- cgit v1.2.3