[052/117] x86: Fix NULL pointer access in irq_force_complete_move() for Xen guests

From: Greg KH
Date: Mon May 10 2010 - 19:36:45 EST


2.6.33-stable review patch. If anyone has any objections, please let us know.

------------------

From: Prarit Bhargava <prarit@xxxxxxxxxx>

commit bbd391a15d82e14efe9d69ba64cadb855b061dba upstream.

Upstream PV guests fail to boot because of a NULL pointer in
irq_force_complete_move(). It is possible that xen guests have
irq_desc->chip_data = NULL.

Test for NULL chip_data pointer before attempting to complete an irq move.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>
LKML-Reference: <20100427152434.16193.49104.sendpatchset@xxxxxxxxxxxxxxxxxxxxx>
Acked-by: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>
Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
arch/x86/kernel/apic/io_apic.c | 3 +++
1 file changed, 3 insertions(+)

--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2539,6 +2539,9 @@ void irq_force_complete_move(int irq)
struct irq_desc *desc = irq_to_desc(irq);
struct irq_cfg *cfg = desc->chip_data;

+ if (!cfg)
+ return;
+
__irq_complete_move(&desc, cfg->vector);
}
#else


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/