From: Zwane Mwaikambo This patch makes us bail out in case we may have an interrupt which couldn't be associated with an interrupt controller. Without this we allow unconfigured interrupts to be assigned and then later on we get "unexpected IRQ trap at vector xx" during the ack phase. scenario: This can occur if we fail irq setup during setup_IO_APIC_irqs for some reason or other and then miss getting assigned a vector. Later on we then get assigned no_irq_type as our handler. Patch for i386 and x86_64 (forwarded by akpm@digeo.com) arch/i386/kernel/irq.c | 2 ++ arch/x86_64/kernel/irq.c | 3 +++ 2 files changed, 5 insertions(+) diff -puN arch/i386/kernel/irq.c~fail-setup_irq-for-unconfigured-IRQs arch/i386/kernel/irq.c --- 25/arch/i386/kernel/irq.c~fail-setup_irq-for-unconfigured-IRQs 2003-03-20 03:11:45.000000000 -0800 +++ 25-akpm/arch/i386/kernel/irq.c 2003-03-20 03:11:45.000000000 -0800 @@ -744,6 +744,8 @@ int setup_irq(unsigned int irq, struct i struct irqaction *old, **p; irq_desc_t *desc = irq_desc + irq; + if (desc->handler == &no_irq_type) + return -ENOSYS; /* * Some drivers like serial.c use request_irq() heavily, * so we have to be careful not to interfere with a diff -puN arch/x86_64/kernel/irq.c~fail-setup_irq-for-unconfigured-IRQs arch/x86_64/kernel/irq.c --- 25/arch/x86_64/kernel/irq.c~fail-setup_irq-for-unconfigured-IRQs 2003-03-20 03:11:45.000000000 -0800 +++ 25-akpm/arch/x86_64/kernel/irq.c 2003-03-20 03:11:45.000000000 -0800 @@ -732,6 +732,9 @@ int setup_irq(unsigned int irq, struct i struct irqaction *old, **p; irq_desc_t *desc = irq_desc + irq; + if (desc->handler == &no_irq_type) + return -ENOSYS; + /* * Some drivers like serial.c use request_irq() heavily, * so we have to be careful not to interfere with a _