Commit 4c125b48 authored by Ralf Baechle's avatar Ralf Baechle Committed by Ben Hutchings

MIPS: Zero variable read by get_user / __get_user in case of an error.

commit 640465bd upstream.

This wasn't happening in all cases.
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
parent cfe5ef40
...@@ -302,7 +302,8 @@ do { \ ...@@ -302,7 +302,8 @@ do { \
__get_kernel_common((x), size, __gu_ptr); \ __get_kernel_common((x), size, __gu_ptr); \
else \ else \
__get_user_common((x), size, __gu_ptr); \ __get_user_common((x), size, __gu_ptr); \
} \ } else \
(x) = 0; \
\ \
__gu_err; \ __gu_err; \
}) })
...@@ -317,6 +318,7 @@ do { \ ...@@ -317,6 +318,7 @@ do { \
" .insn \n" \ " .insn \n" \
" .section .fixup,\"ax\" \n" \ " .section .fixup,\"ax\" \n" \
"3: li %0, %4 \n" \ "3: li %0, %4 \n" \
" move %1, $0 \n" \
" j 2b \n" \ " j 2b \n" \
" .previous \n" \ " .previous \n" \
" .section __ex_table,\"a\" \n" \ " .section __ex_table,\"a\" \n" \
...@@ -631,6 +633,7 @@ do { \ ...@@ -631,6 +633,7 @@ do { \
" .insn \n" \ " .insn \n" \
" .section .fixup,\"ax\" \n" \ " .section .fixup,\"ax\" \n" \
"3: li %0, %4 \n" \ "3: li %0, %4 \n" \
" move %1, $0 \n" \
" j 2b \n" \ " j 2b \n" \
" .previous \n" \ " .previous \n" \
" .section __ex_table,\"a\" \n" \ " .section __ex_table,\"a\" \n" \
......
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