]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
fw-cdev __user annotations
authorAl Viro <viro@ftp.linux.org.uk>
Sun, 14 Oct 2007 18:34:40 +0000 (19:34 +0100)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 14 Oct 2007 19:41:51 +0000 (12:41 -0700)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/firewire/fw-cdev.c

index 75388641a7d34619f1a1ec1c11aa856e5d13fe6f..06471302200f4dd6459ce33479d4e1ab98bf0dfd 100644 (file)
@@ -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) {