]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Jun 2018 16:58:14 +0000 (18:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Jun 2018 16:58:14 +0000 (18:58 +0200)
added patches:
objtool-enclose-contents-of-unreachable-macro-in-a-block.patch

queue-4.9/objtool-enclose-contents-of-unreachable-macro-in-a-block.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/objtool-enclose-contents-of-unreachable-macro-in-a-block.patch b/queue-4.9/objtool-enclose-contents-of-unreachable-macro-in-a-block.patch
new file mode 100644 (file)
index 0000000..9f5330d
--- /dev/null
@@ -0,0 +1,45 @@
+From 4e4636cf981b5b629fbfb78aa9f232e015f7d521 Mon Sep 17 00:00:00 2001
+From: Josh Poimboeuf <jpoimboe@redhat.com>
+Date: Mon, 27 Feb 2017 22:21:16 -0600
+Subject: objtool: Enclose contents of unreachable() macro in a block
+
+From: Josh Poimboeuf <jpoimboe@redhat.com>
+
+commit 4e4636cf981b5b629fbfb78aa9f232e015f7d521 upstream.
+
+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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/compiler-gcc.h |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/include/linux/compiler-gcc.h
++++ b/include/linux/compiler-gcc.h
+@@ -223,7 +223,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")))
index 862af42d2e73deb8aad3aa208dcadb17b0219839..6d86daf52c062f7d4e5bd98321f92ff207ad2060 100644 (file)
@@ -27,3 +27,4 @@ objtool-x86-add-several-functions-and-files-to-the-objtool-whitelist.patch
 perf-tools-header-file-sync-up.patch
 objtool-header-file-sync-up.patch
 x86-xen-add-unwind-hint-annotations-to-xen_setup_gdt.patch
+objtool-enclose-contents-of-unreachable-macro-in-a-block.patch