diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-08-20 16:18:53 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-09-13 17:49:41 -0400 |
commit | e69d700535ac43a18032b3c399c69bf4639e89a2 (patch) | |
tree | f9ea7bacf709bbc6e03fa598df9e93c2546279e4 /arch/mips | |
parent | 05d9d0b96e53c52a113fd783c0c97c830c8dc7af (diff) | |
download | talos-obmc-linux-e69d700535ac43a18032b3c399c69bf4639e89a2.tar.gz talos-obmc-linux-e69d700535ac43a18032b3c399c69bf4639e89a2.zip |
mips: copy_from_user() must zero the destination on access_ok() failure
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/uaccess.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h index 11b965f98d95..21a2aaba20d5 100644 --- a/arch/mips/include/asm/uaccess.h +++ b/arch/mips/include/asm/uaccess.h @@ -14,6 +14,7 @@ #include <linux/kernel.h> #include <linux/errno.h> #include <linux/thread_info.h> +#include <linux/string.h> #include <asm/asm-eva.h> /* @@ -1170,6 +1171,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_from, \ __cu_len); \ + } else { \ + memset(__cu_to, 0, __cu_len); \ } \ } \ __cu_len; \ |