summaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-08-22 00:23:07 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-09-13 17:50:15 -0400
commit917400cecb4b52b5cde5417348322bb9c8272fa6 (patch)
treea2ef184f685b06359bfb6464668fadfa7fc308f0 /arch/sparc
parent6e050503a150b2126620c1a1e9b3a368fcd51eac (diff)
downloadlinux-917400cecb4b52b5cde5417348322bb9c8272fa6.tar.bz2
sparc32: fix copy_from_user()
Cc: stable@vger.kernel.org Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/uaccess_32.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h
index 341a5a133f48..035c89b7df5d 100644
--- a/arch/sparc/include/asm/uaccess_32.h
+++ b/arch/sparc/include/asm/uaccess_32.h
@@ -269,8 +269,10 @@ static inline unsigned long copy_from_user(void *to, const void __user *from, un
if (!__builtin_constant_p(n))
check_object_size(to, n, false);
return __copy_user((__force void __user *) to, from, n);
- } else
+ } else {
+ memset(to, 0, n);
return n;
+ }
}
static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n)