rpms/kernel/F-9 linux-2.6-x86-check-for-null-irq-context.patch, NONE, 1.1 kernel.spec, 1.775, 1.776

Chuck Ebbert cebbert at fedoraproject.org
Mon Sep 29 16:38:34 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1591

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-x86-check-for-null-irq-context.patch 
Log Message:
Don't oops if no IRQ stack is available (#461846)

linux-2.6-x86-check-for-null-irq-context.patch:

--- NEW FILE linux-2.6-x86-check-for-null-irq-context.patch ---
From: Chuck Ebbert <cebbert at redhat.com>

x86: check for null IRQ context before switching stacks

Sometimes during hibernate an unexpected interrupt fires on a disabled CPU.
The CPU's irq context is NULL and this causes a null pointer dereference.
Paper over this problem by checking for NULL and making the handler execute
on the current stack when that happens.

Signed-off-by: Chuck Ebbert <cebbert at redhat.com>

Index: linux-2.6.26.noarch/arch/x86/kernel/irq_32.c
===================================================================
--- linux-2.6.26.noarch.orig/arch/x86/kernel/irq_32.c
+++ linux-2.6.26.noarch/arch/x86/kernel/irq_32.c
@@ -115,6 +115,10 @@ execute_on_irq_stack(int overflow, struc
 	curctx = (union irq_ctx *) current_thread_info();
 	irqctx = hardirq_ctx[smp_processor_id()];
 
+	if (WARN_ONCE(!irqctx, KERN_ERR "No stack for IRQ %d on CPU %d\n",
+			irq, smp_processor_id()))
+		return 0;
+
 	/*
 	 * this is where we switch to the IRQ stack. However, if we are
 	 * already using the IRQ stack (because we interrupted a hardirq


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.775
retrieving revision 1.776
diff -u -r1.775 -r1.776
--- kernel.spec	29 Sep 2008 14:40:27 -0000	1.775
+++ kernel.spec	29 Sep 2008 16:38:04 -0000	1.776
@@ -594,6 +594,7 @@
 Patch97: linux-2.6-x86-hpet-04-workaround-sb700-bios.patch
 Patch98: linux-2.6-x86-fix-memmap-exactmap-boot-argument.patch
 Patch100: linux-2.6-x86-pci-detect-end_bus_number.patch
+Patch101: linux-2.6-x86-check-for-null-irq-context.patch
 
 Patch120: linux-2.6-pci-disable-aspm-per-acpi-fadt-setting.patch
 Patch121: linux-2.6-pci-disable-aspm-on-pre-1.1-devices.patch
@@ -1083,6 +1084,8 @@
 ApplyPatch linux-2.6-x86-fix-memmap-exactmap-boot-argument.patch
 # fix e820 reservation checking
 ApplyPatch linux-2.6-x86-pci-detect-end_bus_number.patch
+# don't oops if there's no IRQ stack available
+ApplyPatch linux-2.6-x86-check-for-null-irq-context.patch
 
 # disable ASPM on devices that don't support it
 ApplyPatch linux-2.6-pci-disable-aspm-per-acpi-fadt-setting.patch
@@ -1899,6 +1902,9 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Mon Sep 29 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.5-49
+- Don't oops if no IRQ stack is available (#461846)
+
 * Mon Sep 29 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.5-48
 - Two patches to help make kerneloops bug reports more useful.
   (requested by Arjan)




More information about the fedora-extras-commits mailing list