mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
mips: copy_from_user() must zero the destination on access_ok() failure
commit e69d700535 upstream.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0be8d73a03
commit
8b3f6edcdd
|
|
@ -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; \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user