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

Commit 20a4a236 authored by Hiroshi Shimamoto's avatar Hiroshi Shimamoto Committed by Ingo Molnar
Browse files

x86: uaccess_64: fix return value in __copy_from_user()



__copy_from_user() will return invalid value 16 when it fails to
access user space and the size is 10.

Signed-off-by: default avatarHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 093bac15
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ int __copy_from_user(void *dst, const void __user *src, unsigned size)
		return ret;
	case 10:
		__get_user_asm(*(u64 *)dst, (u64 __user *)src,
			       ret, "q", "", "=r", 16);
			       ret, "q", "", "=r", 10);
		if (unlikely(ret))
			return ret;
		__get_user_asm(*(u16 *)(8 + (char *)dst),