All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Josh Poimboeuf <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: jpoimboe@redhat.com, hpa@zytor.com, mingo@kernel.org,
	tglx@linutronix.de, peterz@infradead.org, linux@roeck-us.net,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: [tip:core/urgent] objtool: Enclose contents of unreachable() macro in a block
Date: Mon, 27 Feb 2017 22:49:37 -0800	[thread overview]
Message-ID: <tip-4e4636cf981b5b629fbfb78aa9f232e015f7d521@git.kernel.org> (raw)
In-Reply-To: <20170228042116.glmwmwiohcix7o4a@treble>

Commit-ID:  4e4636cf981b5b629fbfb78aa9f232e015f7d521
Gitweb:     http://git.kernel.org/tip/4e4636cf981b5b629fbfb78aa9f232e015f7d521
Author:     Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Mon, 27 Feb 2017 22:21:16 -0600
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 28 Feb 2017 07:47:26 +0100

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>
---
 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..f457b52 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")))

      reply	other threads:[~2017-02-28 10:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 20:59 Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' Guenter Roeck
2017-02-27 22:21 ` Josh Poimboeuf
2017-02-27 23:23   ` Guenter Roeck
2017-02-28  0:43     ` Josh Poimboeuf
2017-02-28  4:21       ` [PATCH] objtool: enclose contents of unreachable() macro in a block Josh Poimboeuf
2017-02-28  6:49         ` tip-bot for Josh Poimboeuf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-4e4636cf981b5b629fbfb78aa9f232e015f7d521@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.