sh64: failing __get_user() should zero
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 22 Aug 2016 03:33:47 +0000 (23:33 -0400)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Feb 2017 22:32:58 +0000 (23:32 +0100)
commit c6852389228df9fb3067f94f3b651de2a7921b36 upstream.

It could be done in exception-handling bits in __get_user_b() et.al.,
but the surgery involved would take more knowledge of sh64 details
than I have or _want_ to have.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
arch/sh/include/asm/uaccess_64.h

index 2e07e0f40c6af3038ca6b69fecfefefe528dc2b8..a2f9d0531328cb97d6efab1decf6a32947af577c 100644 (file)
@@ -24,6 +24,7 @@
 #define __get_user_size(x,ptr,size,retval)                     \
 do {                                                           \
        retval = 0;                                             \
+       x = 0;                                                  \
        switch (size) {                                         \
        case 1:                                                 \
                retval = __get_user_asm_b((void *)&x,           \