--- linux/arch/i386/kernel/irq.c.org Thu Feb 28 14:05:56 2002 +++ linux/arch/i386/kernel/irq.c Fri Mar 1 12:40:37 2002 @@ -577,7 +577,17 @@ irq_desc_t *desc = irq_desc + irq; struct irqaction * action; unsigned int status; + long esp; + /* Debugging check for stack overflow: is there less than 2KB free? */ + __asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : "0" (8191)); + if (esp < (sizeof(struct task_struct) + 2048)) { + printk("do_IRQ: stack overflow: %ld\n", + esp - sizeof(struct task_struct)); + __asm__ __volatile__("movl %%esp,%0" : "=r" (esp)); + show_stack((void *)esp); + } + kstat.irqs[cpu][irq]++; spin_lock(&desc->lock); desc->handler->ack(irq);