Commit 700ff4f0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Chris Mason

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: default avatarDan Carpenter <>
Reviewed-by: default avatarJie Liu <>
Signed-off-by: default avatarChris Mason <>
parent 467bb1d2
......@@ -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;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment