OSDN Git Service
(root)
/
uclinux-h8
/
linux.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
|
history
diff --git
a/arch/metag/include/asm/uaccess.h
b/arch/metag/include/asm/uaccess.h
index
8282cbc
..
273e612
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;
}