linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] powerpc: kdump: Fix NULL pointer dereference in irq disable code
@ 2010-05-11  2:23 Anton Blanchard
  2010-05-11  2:25 ` [PATCH 2/3] powerpc: kdump: CPUs assume the context of the oopsing CPU Anton Blanchard
  2010-05-11  4:14 ` [PATCH 1/3] powerpc: kdump: Fix NULL pointer dereference in irq disable code Michael Ellerman
  0 siblings, 2 replies; 6+ messages in thread
From: Anton Blanchard @ 2010-05-11  2:23 UTC (permalink / raw)
  To: benh, mikey, michael, miltonm; +Cc: linuxppc-dev


With sparse irqs we have to check if we have a descriptor before dereferencing
it.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 6f4613d..5182439 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -375,6 +375,9 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
 	for_each_irq(i) {
 		struct irq_desc *desc = irq_to_desc(i);
 
+		if (!desc)
+			continue;
+
 		if (desc->status & IRQ_INPROGRESS)
 			desc->chip->eoi(i);
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-11  4:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11  2:23 [PATCH 1/3] powerpc: kdump: Fix NULL pointer dereference in irq disable code Anton Blanchard
2010-05-11  2:25 ` [PATCH 2/3] powerpc: kdump: CPUs assume the context of the oopsing CPU Anton Blanchard
2010-05-11  2:27   ` [PATCH 3/3] powerpc: kdump: Use chip->shutdown to disable IRQs Anton Blanchard
2010-05-11  4:11     ` Michael Ellerman
2010-05-11  4:14   ` [PATCH 2/3] powerpc: kdump: CPUs assume the context of the oopsing CPU Michael Ellerman
2010-05-11  4:14 ` [PATCH 1/3] powerpc: kdump: Fix NULL pointer dereference in irq disable code Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).