summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-01-10 03:57:25 -0500
committerChris Mason <clm@fb.com>2013-12-12 07:13:02 -0800
commit700ff4f095d78af0998953e922e041d75254518b (patch)
tree62a52b7a6f5f2eaa91809a0cc5abeac44c4c3f4e /fs
parent467bb1d27c0b783b73e6349304c0d90b5b4f431b (diff)
downloadkernel-common-700ff4f095d78af0998953e922e041d75254518b.tar.gz
kernel-common-700ff4f095d78af0998953e922e041d75254518b.tar.bz2
kernel-common-700ff4f095d78af0998953e922e041d75254518b.zip
Btrfs: fix access_ok() check in btrfs_ioctl_send()
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
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/send.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 6837fe87f3a6..945d1db98f26 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -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;
}