Re: [PATCH] i386: Execute stack overflow warning on interrupt stackII

From: Thomas Gleixner
Date: Mon May 05 2008 - 06:01:15 EST


On Fri, 2 May 2008, Andi Kleen wrote:
> +static void stack_overflow(void)
> +{
> + printk("low stack detected by irq handler\n");

Needs a KERN_ERR

> + /* Execute warning on interrupt stack */
> + if (unlikely(overflow))
> + call_on_stack2(stack_overflow, isp, 0, 0);
> +
> + call_on_stack2(desc->handle_irq, isp, irq, desc);

arch/x86/kernel/irq_32.c:148: warning: passing argument 2 of ʽcall_on_stack2ʼ makes integer from pointer without a cast
arch/x86/kernel/irq_32.c:150: warning: passing argument 2 of ʽcall_on_stack2ʼ makes integer from pointer without a cast
arch/x86/kernel/irq_32.c:150: warning: passing argument 4 of ʽcall_on_stack2ʼ makes integer from pointer without a cast

> } else
> #endif
> - desc->handle_irq(irq, desc);
> + {
> + /* AK: Slightly bogus here */

Bogus comment. This applies to both the !4KSTACKS and the overflow of
the irq stack in the 4KSTACKS case.

> + if (overflow)

unlikely(overflow) ?

> + stack_overflow();
> + desc->handle_irq(irq, desc);

Thanks,

tglx