--- /dev/null
+From 190320c3b6640d4104650f55ff69611e050ea06b Mon Sep 17 00:00:00 2001
+From: Vikram Mulukutla <markivx@codeaurora.org>
+Date: Mon, 30 Jul 2012 14:39:58 -0700
+Subject: panic: fix a possible deadlock in panic()
+
+From: Vikram Mulukutla <markivx@codeaurora.org>
+
+commit 190320c3b6640d4104650f55ff69611e050ea06b upstream.
+
+panic_lock is meant to ensure that panic processing takes place only on
+one cpu; if any of the other cpus encounter a panic, they will spin
+waiting to be shut down.
+
+However, this causes a regression in this scenario:
+
+1. Cpu 0 encounters a panic and acquires the panic_lock
+ and proceeds with the panic processing.
+2. There is an interrupt on cpu 0 that also encounters
+ an error condition and invokes panic.
+3. This second invocation fails to acquire the panic_lock
+ and enters the infinite while loop in panic_smp_self_stop.
+
+Thus all panic processing is stopped, and the cpu is stuck for eternity
+in the while(1) inside panic_smp_self_stop.
+
+To address this, disable local interrupts with local_irq_disable before
+acquiring the panic_lock. This will prevent interrupt handlers from
+executing during the panic processing, thus avoiding this particular
+problem.
+
+Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
+Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
+Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/panic.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -75,6 +75,14 @@ void panic(const char *fmt, ...)
+ int state = 0;
+
+ /*
++ * Disable local interrupts. This will prevent panic_smp_self_stop
++ * from deadlocking the first cpu that invokes the panic, since
++ * there is nothing to prevent an interrupt handler (that runs
++ * after the panic_lock is acquired) from invoking panic again.
++ */
++ local_irq_disable();
++
++ /*
+ * It's possible to come here directly from a panic-assertion and
+ * not have preempt disabled. Some functions called from here want
+ * preempt to be disabled. No point enabling it later though...
spinlocks-and-preemption-points-need-to-be-at-least-compiler-barriers.patch
crypto-gcm-fix-assumption-that-assoc-has-one-segment.patch
block-avoid-using-uninitialized-value-in-from-queue_var_store.patch
+x86-fix-rebuild-with-efi_stub-enabled.patch
+thermal-return-an-error-on-failure-to-register-thermal-class.patch
+panic-fix-a-possible-deadlock-in-panic.patch
--- /dev/null
+From da28d966f6aa942ae836d09729f76a1647932309 Mon Sep 17 00:00:00 2001
+From: Richard Guy Briggs <rbriggs@redhat.com>
+Date: Tue, 12 Feb 2013 19:39:44 +0000
+Subject: thermal: return an error on failure to register thermal class
+
+From: Richard Guy Briggs <rbriggs@redhat.com>
+
+commit da28d966f6aa942ae836d09729f76a1647932309 upstream.
+
+The return code from the registration of the thermal class is used to
+unallocate resources, but this failure isn't passed back to the caller of
+thermal_init. Return this failure back to the caller.
+
+This bug was introduced in changeset 4cb18728 which overwrote the return code
+when the variable was re-used to catch the return code of the registration of
+the genetlink thermal socket family.
+
+Signed-off-by: Richard Guy Briggs <rbriggs@redhat.com>
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Cc: Jonghwan Choi <jhbird.choi@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/thermal/thermal_sys.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/thermal/thermal_sys.c
++++ b/drivers/thermal/thermal_sys.c
+@@ -1383,6 +1383,7 @@ static int __init thermal_init(void)
+ idr_destroy(&thermal_cdev_idr);
+ mutex_destroy(&thermal_idr_lock);
+ mutex_destroy(&thermal_list_lock);
++ return result;
+ }
+ result = genetlink_init();
+ return result;
--- /dev/null
+From 918708245e92941df16a634dc201b407d12bcd91 Mon Sep 17 00:00:00 2001
+From: Jan Beulich <JBeulich@suse.com>
+Date: Wed, 3 Apr 2013 15:47:33 +0100
+Subject: x86: Fix rebuild with EFI_STUB enabled
+
+From: Jan Beulich <JBeulich@suse.com>
+
+commit 918708245e92941df16a634dc201b407d12bcd91 upstream.
+
+eboot.o and efi_stub_$(BITS).o didn't get added to "targets", and hence
+their .cmd files don't get included by the build machinery, leading to
+the files always getting rebuilt.
+
+Rather than adding the two files individually, take the opportunity and
+add $(VMLINUX_OBJS) to "targets" instead, thus allowing the assignment
+at the top of the file to be shrunk quite a bit.
+
+At the same time, remove a pointless flags override line - the variable
+assigned to was misspelled anyway, and the options added are
+meaningless for assembly sources.
+
+[ hpa: the patch is not minimal, but I am taking it for -urgent anyway
+ since the excess impact of the patch seems to be small enough. ]
+
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Link: http://lkml.kernel.org/r/515C5D2502000078000CA6AD@nat28.tlf.novell.com
+Cc: Matthew Garrett <mjg@redhat.com>
+Cc: Matt Fleming <matt.fleming@intel.com>
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/boot/compressed/Makefile | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/boot/compressed/Makefile
++++ b/arch/x86/boot/compressed/Makefile
+@@ -4,7 +4,7 @@
+ # create a compressed vmlinux image from the original vmlinux
+ #
+
+-targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo head_$(BITS).o misc.o string.o cmdline.o early_serial_console.o piggy.o
++targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo
+
+ KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
+ KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
+@@ -29,7 +29,6 @@ VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)
+ $(obj)/piggy.o
+
+ $(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
+-$(obj)/efi_stub_$(BITS).o: KBUILD_CLFAGS += -fshort-wchar -mno-red-zone
+
+ ifeq ($(CONFIG_EFI_STUB), y)
+ VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o
+@@ -43,7 +42,7 @@ OBJCOPYFLAGS_vmlinux.bin := -R .comment
+ $(obj)/vmlinux.bin: vmlinux FORCE
+ $(call if_changed,objcopy)
+
+-targets += vmlinux.bin.all vmlinux.relocs
++targets += $(patsubst $(obj)/%,%,$(VMLINUX_OBJS)) vmlinux.bin.all vmlinux.relocs
+
+ CMD_RELOCS = arch/x86/tools/relocs
+ quiet_cmd_relocs = RELOCS $@