Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1589165
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] objtool: enclose contents of unreachable() macro in a block |
| Date | 2017-02-28 05:30 +0100 |
| Message-ID | <tfHAe-7Cn-11@gated-at.bofh.it> (permalink) |
| References | <tfAIq-2Pe-21@gated-at.bofh.it> <tfBXQ-3Cf-9@gated-at.bofh.it> <tfEiZ-576-9@gated-at.bofh.it> <tfEiZ-576-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Suggested-by: Guenter Roeck <linux@roeck-us.net>
Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
include/linux/compiler-gcc.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index de47134..f457b520 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -215,7 +215,8 @@
* this in the preprocessor, but we can live with this because they're
* unreleased. Really, we need to have autoconf for the kernel.
*/
-#define unreachable() annotate_unreachable(); __builtin_unreachable()
+#define unreachable() \
+ do { annotate_unreachable(); __builtin_unreachable(); } while (0)
/* Mark a function definition as prohibited from being cloned. */
#define __noclone __attribute__((__noclone__, __optimize__("no-tracer")))
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' Guenter Roeck <linux@roeck-us.net> - 2017-02-27 22:10 +0100
Re: Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-02-27 23:30 +0100
Re: Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-02-28 02:00 +0100
[PATCH] objtool: enclose contents of unreachable() macro in a block Josh Poimboeuf <jpoimboe@redhat.com> - 2017-02-28 05:30 +0100
[tip:core/urgent] objtool: Enclose contents of unreachable() macro in a block tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2017-02-28 11:50 +0100
Re: Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' Guenter Roeck <linux@roeck-us.net> - 2017-02-28 02:30 +0100
csiph-web