提交 700ff4f0 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NJie Liu <jeff.liu@oracle.com>
Signed-off-by: NChris Mason <clm@fb.com>
cc: stable@vger.kernel.org
上级 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
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册