mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 10:12:16 +09:00
fs/compat_rw_copy_check_uvector: add missing compat_ptr call
commit7cbe17701aupstream. A call to access_ok is missing a compat_ptr conversion. Introduced withb83733639a"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 <heiko.carstens@de.ibm.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fed3ff43e1
commit
fa31d3fc1d
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user