From: Hiroshi Shimamoto Date: Fri, 14 Nov 2008 02:06:04 +0000 (-0800) Subject: x86: uaccess_64: fix return value in __copy_from_user() X-Git-Tag: upstream/snapshot3+hdmi~21297^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20a4a236c7de5c915551cdc562482aa53eaff40e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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: Hiroshi Shimamoto Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h index 664f152..f8cfd00 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h @@ -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),