* [PATCH] fs/compat_rw_copy_check_uvector: add missing compat_ptr call
@ 2010-05-28 11:41 Heiko Carstens
2010-05-28 15:31 ` Jeff Moyer
0 siblings, 1 reply; 2+ messages in thread
From: Heiko Carstens @ 2010-05-28 11:41 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Jeff Moyer
From: Heiko Carstens <heiko.carstens@de.ibm.com>
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 <heiko.carstens@de.ibm.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
---
Probably should go into stable like the original patch.
fs/compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -626,7 +626,7 @@ ssize_t compat_rw_copy_check_uvector(int
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fs/compat_rw_copy_check_uvector: add missing compat_ptr call
2010-05-28 11:41 [PATCH] fs/compat_rw_copy_check_uvector: add missing compat_ptr call Heiko Carstens
@ 2010-05-28 15:31 ` Jeff Moyer
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Moyer @ 2010-05-28 15:31 UTC (permalink / raw)
To: Heiko Carstens; +Cc: Andrew Morton, linux-kernel
Heiko Carstens <heiko.carstens@de.ibm.com> writes:
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> 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 <heiko.carstens@de.ibm.com>
Thanks for catching this. I'm ashamed I missed the compiler warning.
:(
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-28 15:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-28 11:41 [PATCH] fs/compat_rw_copy_check_uvector: add missing compat_ptr call Heiko Carstens
2010-05-28 15:31 ` Jeff Moyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®