Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30957
b: refs/heads/master
c: a052b68
h: refs/heads/master
i:
  30955: f24140f
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Jun 28, 2006
1 parent e019a50 commit e797a68
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 79bc79b07c9c6f8ae9290704e9e503a9327fcbb2
refs/heads/master: a052b68b1e7a31f1e6a721290035e9deb0f6fed9
6 changes: 6 additions & 0 deletions trunk/arch/i386/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
u32 *isp;
#endif

if (unlikely((unsigned)irq >= NR_IRQS)) {
printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
__FUNCTION__, irq);
BUG();
}

irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB free? */
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86_64/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e797a68

Please sign in to comment.