Commit 34c46401 authored by Al Viro's avatar Al Viro Committed by Sasha Levin

mips: copy_from_user() must zero the destination on access_ok() failure

[ Upstream commit e69d7005 ]

Cc: stable@vger.kernel.org
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 57dcb60f
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/thread_info.h> #include <linux/thread_info.h>
#include <linux/string.h>
#include <asm/asm-eva.h> #include <asm/asm-eva.h>
/* /*
...@@ -1136,6 +1137,8 @@ extern size_t __copy_in_user_eva(void *__to, const void *__from, size_t __n); ...@@ -1136,6 +1137,8 @@ extern size_t __copy_in_user_eva(void *__to, const void *__from, size_t __n);
__cu_len = __invoke_copy_from_user(__cu_to, \ __cu_len = __invoke_copy_from_user(__cu_to, \
__cu_from, \ __cu_from, \
__cu_len); \ __cu_len); \
} else { \
memset(__cu_to, 0, __cu_len); \
} \ } \
} \ } \
__cu_len; \ __cu_len; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment