The IRQ migration IRQ has no irq_cfg and is outside of the range
ipipe_apic_irq_vector can handle. This causes oopses when
__ipipe_get_ioapic_irq_vector is processing it.

Reported-by: Franz Engel <franz_lambert_en...@yahoo.de>
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
---
 arch/x86/kernel/apic/io_apic.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8eaaadc..52f9686 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3985,8 +3985,12 @@ int acpi_get_override_irq(u32 gsi, int *trigger, int 
*polarity)
 #ifdef CONFIG_IPIPE
 unsigned __ipipe_get_ioapic_irq_vector(int irq)
 {
-       return irq >= IPIPE_FIRST_APIC_IRQ && irq < IPIPE_NR_XIRQS ?
-               ipipe_apic_irq_vector(irq) : irq_cfg(irq)->vector;
+       if (irq >= IPIPE_FIRST_APIC_IRQ && irq < IPIPE_NR_XIRQS)
+               return ipipe_apic_irq_vector(irq);
+       else if (irq == IRQ_MOVE_CLEANUP_VECTOR)
+               return irq;
+       else
+               return irq_cfg(irq)->vector;
 }
 #endif /* CONFIG_IPIPE */
 
-- 
1.7.1

_______________________________________________
Adeos-main mailing list
Adeos-main@gna.org
https://mail.gna.org/listinfo/adeos-main

Reply via email to