diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2017-02-27 23:21:16 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-02-28 01:47:26 -0500 |
commit | 4e4636cf981b5b629fbfb78aa9f232e015f7d521 (patch) | |
tree | 1697356226b850eef54aa72908fd3964e64508df /include/linux/compiler-gcc.h | |
parent | 3d1e236022cc1426b0834565995ddee2ca231cee (diff) |
objtool: Enclose contents of unreachable() macro in a block
Guenter Roeck reported a boot failure in mips64. It was bisected to the
following commit:
d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends")
The unreachable() macro was formerly only composed of a single
statement. The above commit added a second statement, but neglected to
enclose the statements in a block.
Suggested-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends")
Link: http://lkml.kernel.org/r/20170228042116.glmwmwiohcix7o4a@treble
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r-- | include/linux/compiler-gcc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index de471346b365..f457b520ead6 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -215,7 +215,8 @@ | |||
215 | * this in the preprocessor, but we can live with this because they're | 215 | * this in the preprocessor, but we can live with this because they're |
216 | * unreleased. Really, we need to have autoconf for the kernel. | 216 | * unreleased. Really, we need to have autoconf for the kernel. |
217 | */ | 217 | */ |
218 | #define unreachable() annotate_unreachable(); __builtin_unreachable() | 218 | #define unreachable() \ |
219 | do { annotate_unreachable(); __builtin_unreachable(); } while (0) | ||
219 | 220 | ||
220 | /* Mark a function definition as prohibited from being cloned. */ | 221 | /* Mark a function definition as prohibited from being cloned. */ |
221 | #define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) | 222 | #define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) |