]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Btrfs: fix access_ok() check in btrfs_ioctl_send()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 10 Jan 2013 08:57:25 +0000 (03:57 -0500)
committerChris Mason <clm@fb.com>
Thu, 12 Dec 2013 15:13:02 +0000 (07:13 -0800)
The closing parenthesis is in the wrong place.  We want to check
"sizeof(*arg->clone_sources) * arg->clone_sources_count" instead of
"sizeof(*arg->clone_sources * arg->clone_sources_count)".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
cc: stable@vger.kernel.org

fs/btrfs/send.c

index 6837fe87f3a6bb9f471f54c596e0d98fe67059a3..945d1db98f26968ec051a6ff6116f971f18e7303 100644 (file)
@@ -4723,8 +4723,8 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
        }
 
        if (!access_ok(VERIFY_READ, arg->clone_sources,
-                       sizeof(*arg->clone_sources *
-                       arg->clone_sources_count))) {
+                       sizeof(*arg->clone_sources) *
+                       arg->clone_sources_count)) {
                ret = -EFAULT;
                goto out;
        }