diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2017-08-24 01:29:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-27 15:43:11 +0300 |
commit | b48729bc5344e49721f68a1b9f7cb8d67b764852 (patch) | |
tree | d4c152c7f55ed75b46e8c3ae6dec3a4c1190c822 /include | |
parent | c8e0c47c35812c79dee418b13d125918a8c8b834 (diff) | |
download | linux-b48729bc5344e49721f68a1b9f7cb8d67b764852.tar.xz |
<linux/uaccess.h>: Fix copy_in_user() declaration
commit f58e76c1c551c7577b25a6fe493d82f5214331b7 upstream.
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>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/uaccess.h | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |