diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-01-10 08:57:25 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-20 15:49:03 (GMT) |
commit | 93ecac1d5fad38f8a04e9bcdfaa181ad8ff23681 (patch) | |
tree | 904344e1d3180e2d15d26f12fb738054da5c75cc /fs | |
parent | 2c010ea5d9d0c8caaf37d02d0294e925a0ccf1f5 (diff) | |
download | linux-fsl-qoriq-93ecac1d5fad38f8a04e9bcdfaa181ad8ff23681.tar.xz |
Btrfs: fix access_ok() check in btrfs_ioctl_send()
commit 700ff4f095d78af0998953e922e041d75254518b upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/send.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index e46e0ed..f1b0c22 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -4756,8 +4756,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; } |