Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718678
| From | Bart Van Assche <bart.vanassche@wdc.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] <linux/uaccess.h>: Fix copy_in_user() declaration |
| Date | 2017-08-24 00:40 +0200 |
| Message-ID | <uhMtz-6r1-17@gated-at.bofh.it> (permalink) |
| References | <uhMtz-6r1-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
copy_in_user() copies data from user-space address @from to user-
space address @to. Hence declare both @from and @to as user-space
pointers.
Fixes: commit d597580d3737 ("generic ...copy_..._user primitives")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: <stable@vger.kernel.org>
---
include/linux/uaccess.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index acdd6f915a8d..20ef8e6ec2db 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -156,7 +156,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
}
#ifdef CONFIG_COMPAT
static __always_inline unsigned long __must_check
-copy_in_user(void __user *to, const void *from, unsigned long n)
+copy_in_user(void __user *to, const void __user *from, unsigned long n)
{
might_fault();
if (access_ok(VERIFY_WRITE, to, n) && access_ok(VERIFY_READ, from, n))
--
2.14.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 1/2] <linux/uaccess.h>: Fix copy_in_user() declaration Bart Van Assche <bart.vanassche@wdc.com> - 2017-08-24 00:40 +0200
csiph-web