提交 7cbe1770 编写于 作者: H Heiko Carstens 提交者: Linus Torvalds

fs/compat_rw_copy_check_uvector: add missing compat_ptr call

A call to access_ok is missing a compat_ptr conversion.  Introduced with
b8373363 "compat: factor out
compat_rw_copy_check_uvector from compat_do_readv_writev"

fs/compat.c: In function 'compat_rw_copy_check_uvector':
fs/compat.c:629: warning: passing argument 1 of '__access_ok' makes pointer from integer without a cast
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: NJeff Moyer <jmoyer@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 eaa6e4dd
...@@ -626,7 +626,7 @@ ssize_t compat_rw_copy_check_uvector(int type, ...@@ -626,7 +626,7 @@ ssize_t compat_rw_copy_check_uvector(int type,
tot_len += len; tot_len += len;
if (tot_len < tmp) /* maths overflow on the compat_ssize_t */ if (tot_len < tmp) /* maths overflow on the compat_ssize_t */
goto out; goto out;
if (!access_ok(vrfy_dir(type), buf, len)) { if (!access_ok(vrfy_dir(type), compat_ptr(buf), len)) {
ret = -EFAULT; ret = -EFAULT;
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册