|
@@ -26,6 +26,8 @@ EXPORT_PER_CPU_SYMBOL(irq_stat);
|
|
|
DEFINE_PER_CPU(struct pt_regs *, irq_regs);
|
|
|
EXPORT_PER_CPU_SYMBOL(irq_regs);
|
|
|
|
|
|
+int sysctl_panic_on_stackoverflow;
|
|
|
+
|
|
|
/*
|
|
|
* Probabilistic stack overflow check:
|
|
|
*
|
|
@@ -65,6 +67,9 @@ static inline void stack_overflow_check(struct pt_regs *regs)
|
|
|
current->comm, curbase, regs->sp,
|
|
|
irq_stack_top, irq_stack_bottom,
|
|
|
estack_top, estack_bottom);
|
|
|
+
|
|
|
+ if (sysctl_panic_on_stackoverflow)
|
|
|
+ panic("low stack detected by irq handler - check messages\n");
|
|
|
#endif
|
|
|
}
|
|
|
|