diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:24:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:24:53 -0400 |
commit | d4b80afbba49e968623330f1336da8c724da8aad (patch) | |
tree | a9478bd77d8b001a6a7119328d34e9666d7bfe93 /arch/sh | |
parent | fcd709ef20a9d83bdb7524d27cd6719dac8690a0 (diff) | |
parent | 4cea8776571b18db7485930cb422faa739580c8c (diff) |
Merge branch 'linus' into x86/asm, to pick up recent fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/include/asm/uaccess.h | 5 | ||||
-rw-r--r-- | arch/sh/include/asm/uaccess_64.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/sh/include/asm/uaccess.h b/arch/sh/include/asm/uaccess.h index a49635c51266..92ade79ac427 100644 --- a/arch/sh/include/asm/uaccess.h +++ b/arch/sh/include/asm/uaccess.h | |||
@@ -151,7 +151,10 @@ copy_from_user(void *to, const void __user *from, unsigned long n) | |||
151 | __kernel_size_t __copy_size = (__kernel_size_t) n; | 151 | __kernel_size_t __copy_size = (__kernel_size_t) n; |
152 | 152 | ||
153 | if (__copy_size && __access_ok(__copy_from, __copy_size)) | 153 | if (__copy_size && __access_ok(__copy_from, __copy_size)) |
154 | return __copy_user(to, from, __copy_size); | 154 | __copy_size = __copy_user(to, from, __copy_size); |
155 | |||
156 | if (unlikely(__copy_size)) | ||
157 | memset(to + (n - __copy_size), 0, __copy_size); | ||
155 | 158 | ||
156 | return __copy_size; | 159 | return __copy_size; |
157 | } | 160 | } |
diff --git a/arch/sh/include/asm/uaccess_64.h b/arch/sh/include/asm/uaccess_64.h index c01376c76b86..ca5073dd4596 100644 --- a/arch/sh/include/asm/uaccess_64.h +++ b/arch/sh/include/asm/uaccess_64.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define __get_user_size(x,ptr,size,retval) \ | 24 | #define __get_user_size(x,ptr,size,retval) \ |
25 | do { \ | 25 | do { \ |
26 | retval = 0; \ | 26 | retval = 0; \ |
27 | x = 0; \ | ||
27 | switch (size) { \ | 28 | switch (size) { \ |
28 | case 1: \ | 29 | case 1: \ |
29 | retval = __get_user_asm_b((void *)&x, \ | 30 | retval = __get_user_asm_b((void *)&x, \ |