Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f58e76c1 authored by Bart Van Assche's avatar Bart Van Assche Committed by Al Viro
Browse files

<linux/uaccess.h>: Fix copy_in_user() declaration



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 d597580d ("generic ...copy_..._user primitives")
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ddef7ed2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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))