projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5e541f
)
metag: copy_from_user() should zero the destination on access_ok() failure
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 19 Aug 2016 02:08:20 +0000
(22:08 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 13 Sep 2016 21:49:40 +0000
(17:49 -0400)
Cc: stable@vger.kernel.org
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/metag/include/asm/uaccess.h
patch
|
blob
|
blame
|
history
diff --git
a/arch/metag/include/asm/uaccess.h
b/arch/metag/include/asm/uaccess.h
index 8282cbce7e399a84488e675af0751341d24f0205..273e61225c277ae67ba28dfae4ef9123e3ef34a9 100644
(file)
--- a/
arch/metag/include/asm/uaccess.h
+++ b/
arch/metag/include/asm/uaccess.h
@@
-204,8
+204,9
@@
extern unsigned long __must_check __copy_user_zeroing(void *to,
static inline unsigned long
copy_from_user(void *to, const void __user *from, unsigned long n)
{
- if (
access_ok(VERIFY_READ, from, n
))
+ if (
likely(access_ok(VERIFY_READ, from, n)
))
return __copy_user_zeroing(to, from, n);
+ memset(to, 0, n);
return n;
}