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 <[email protected]>
Reviewed-by: Jie Liu <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
cc: [email protected]
This commit is contained in:
Dan Carpenter 2013-01-10 03:57:25 -05:00 • committed by Chris Mason
commit 700ff4f095

View 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;
}