From d7b81ff0576943ad2b5b1a956bcfb03438f457e9 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Tue, 5 Jan 2010 14:19:11 +0100 Subject: [PATCH] --- yaml --- r: 178897 b: refs/heads/master c: 409d02ef6d74f5e91f5ea4c587b2ee1375f106fc h: refs/heads/master i: 178895: c1043892d1baec2de620435215e8f2f61544b4ba v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/uaccess_32.h | 5 ++--- trunk/arch/x86/include/asm/uaccess_64.h | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index f7dcf49794ef..fef0c0d03e7e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f4b825bde98938f160315d655597bc9731521cae +refs/heads/master: 409d02ef6d74f5e91f5ea4c587b2ee1375f106fc diff --git a/trunk/arch/x86/include/asm/uaccess_32.h b/trunk/arch/x86/include/asm/uaccess_32.h index 0c9825e97f36..088d09fb1615 100644 --- a/trunk/arch/x86/include/asm/uaccess_32.h +++ b/trunk/arch/x86/include/asm/uaccess_32.h @@ -205,14 +205,13 @@ static inline unsigned long __must_check copy_from_user(void *to, unsigned long n) { int sz = __compiletime_object_size(to); - int ret = -EFAULT; if (likely(sz == -1 || sz >= n)) - ret = _copy_from_user(to, from, n); + n = _copy_from_user(to, from, n); else copy_from_user_overflow(); - return ret; + return n; } long __must_check strncpy_from_user(char *dst, const char __user *src, diff --git a/trunk/arch/x86/include/asm/uaccess_64.h b/trunk/arch/x86/include/asm/uaccess_64.h index 46324c6a4f6e..535e421498f6 100644 --- a/trunk/arch/x86/include/asm/uaccess_64.h +++ b/trunk/arch/x86/include/asm/uaccess_64.h @@ -30,16 +30,15 @@ static inline unsigned long __must_check copy_from_user(void *to, unsigned long n) { int sz = __compiletime_object_size(to); - int ret = -EFAULT; might_fault(); if (likely(sz == -1 || sz >= n)) - ret = _copy_from_user(to, from, n); + n = _copy_from_user(to, from, n); #ifdef CONFIG_DEBUG_VM else WARN(1, "Buffer overflow detected!\n"); #endif - return ret; + return n; } static __always_inline __must_check