From: Heiko Carstens Date: Fri, 4 Jun 2010 21:14:47 +0000 (-0700) Subject: fs/compat_rw_copy_check_uvector: add missing compat_ptr call X-Git-Tag: v2.6.34.1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa31d3fc1debc200bf66240519e77aac606d40fa;p=thirdparty%2Fkernel%2Fstable.git fs/compat_rw_copy_check_uvector: add missing compat_ptr call commit 7cbe17701a0379c7b05a79a6df4f24e41d2afde8 upstream. A call to access_ok is missing a compat_ptr conversion. Introduced with b83733639a494d5f42fa00a2506563fbd2d3015d "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: Heiko Carstens Reviewed-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/compat.c b/fs/compat.c index f0b391c50552d..6490d2134ff3e 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -626,7 +626,7 @@ ssize_t compat_rw_copy_check_uvector(int type, tot_len += len; if (tot_len < tmp) /* maths overflow on the compat_ssize_t */ goto out; - if (!access_ok(vrfy_dir(type), buf, len)) { + if (!access_ok(vrfy_dir(type), compat_ptr(buf), len)) { ret = -EFAULT; goto out; }