projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
351a44f
)
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
Willy Tarreau
<w@1wt.eu>
Mon, 6 Feb 2017 22:33:02 +0000
(23:33 +0100)
commit
8ae95ed4ae5fc7c3391ed668b2014c9e2079533b
upstream.
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
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 0748b0a9798684c40eb02f5782472862245d9b78..7841f2290385fbe0b9ed7a8a1363ea3670197f02 100644
(file)
--- a/
arch/metag/include/asm/uaccess.h
+++ b/
arch/metag/include/asm/uaccess.h
@@
-199,8
+199,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;
}