aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-09-18 14:57:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-09-18 14:57:24 -0400
commit88b4ad287c91790e98fe9381b5cba7b381f359c0 (patch)
tree940afd1ae0074b7431f4b3a8c247fe5927ae387d
parent3286be94808c403a5ca6bb2830d933439315cb99 (diff)
parent8e4b72054f554967827e18be1de0e8122e6efc04 (diff)
Merge tag 'fixes-for-linus-v4.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull uaccess fixes from Guenter Roeck: "Two patches fixing problems introduced with copy_from_user changes" * tag 'fixes-for-linus-v4.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: openrisc: fix the fix of copy_from_user() avr32: fix 'undefined reference to `___copy_from_user'
-rw-r--r--arch/avr32/lib/copy_user.S4
-rw-r--r--arch/openrisc/include/asm/uaccess.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/avr32/lib/copy_user.S b/arch/avr32/lib/copy_user.S
index 96a6de9d578f..075373471da1 100644
--- a/arch/avr32/lib/copy_user.S
+++ b/arch/avr32/lib/copy_user.S
@@ -23,8 +23,8 @@
23 */ 23 */
24 .text 24 .text
25 .align 1 25 .align 1
26 .global copy_from_user 26 .global ___copy_from_user
27 .type copy_from_user, @function 27 .type ___copy_from_user, @function
28___copy_from_user: 28___copy_from_user:
29 branch_if_kernel r8, __copy_user 29 branch_if_kernel r8, __copy_user
30 ret_if_privileged r8, r11, r10, r10 30 ret_if_privileged r8, r11, r10, r10
diff --git a/arch/openrisc/include/asm/uaccess.h b/arch/openrisc/include/asm/uaccess.h
index cbad29b5a131..5cc6b4f1b795 100644
--- a/arch/openrisc/include/asm/uaccess.h
+++ b/arch/openrisc/include/asm/uaccess.h
@@ -276,7 +276,7 @@ copy_from_user(void *to, const void *from, unsigned long n)
276 unsigned long res = n; 276 unsigned long res = n;
277 277
278 if (likely(access_ok(VERIFY_READ, from, n))) 278 if (likely(access_ok(VERIFY_READ, from, n)))
279 n = __copy_tofrom_user(to, from, n); 279 res = __copy_tofrom_user(to, from, n);
280 if (unlikely(res)) 280 if (unlikely(res))
281 memset(to + (n - res), 0, res); 281 memset(to + (n - res), 0, res);
282 return res; 282 return res;