summaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/kernel/irq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index 3be0a7e4bf0..bfa82f52a5c 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -118,6 +118,12 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
/* high bit used in ret_from_ code */
unsigned irq = ~regs->orig_rax;
+ if (unlikely(irq >= NR_IRQS)) {
+ printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
+ __FUNCTION__, irq);
+ BUG();
+ }
+
exit_idle();
irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW