summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-08-21 23:33:47 -0400
committerSasha Levin <alexander.levin@verizon.com>2016-10-05 22:40:20 -0400
commit94000fc8f4ab34b031caecdfcc767f478900a7bb (patch)
tree0234b3bbbec39b9d864623112844d1ae74b0cf84
parentc1c77a5f1371315e5ee0686ad38ee6826cd458bd (diff)
downloadlwn-94000fc8f4ab34b031caecdfcc767f478900a7bb.tar.gz
lwn-94000fc8f4ab34b031caecdfcc767f478900a7bb.zip
sh64: failing __get_user() should zero
[ Upstream commit c6852389228df9fb3067f94f3b651de2a7921b36 ] It could be done in exception-handling bits in __get_user_b() et.al., but the surgery involved would take more knowledge of sh64 details than I have or _want_ to have. Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-rw-r--r--arch/sh/include/asm/uaccess_64.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sh/include/asm/uaccess_64.h b/arch/sh/include/asm/uaccess_64.h
index 2e07e0f40c6a..a2f9d0531328 100644
--- a/arch/sh/include/asm/uaccess_64.h
+++ b/arch/sh/include/asm/uaccess_64.h
@@ -24,6 +24,7 @@
#define __get_user_size(x,ptr,size,retval) \
do { \
retval = 0; \
+ x = 0; \
switch (size) { \
case 1: \
retval = __get_user_asm_b((void *)&x, \