|
@@ -234,6 +234,8 @@ unsigned long oops_begin(void)
|
|
|
EXPORT_SYMBOL_GPL(oops_begin);
|
|
|
NOKPROBE_SYMBOL(oops_begin);
|
|
|
|
|
|
+void __noreturn rewind_stack_do_exit(int signr);
|
|
|
+
|
|
|
void oops_end(unsigned long flags, struct pt_regs *regs, int signr)
|
|
|
{
|
|
|
if (regs && kexec_should_crash(current))
|
|
@@ -255,7 +257,13 @@ void oops_end(unsigned long flags, struct pt_regs *regs, int signr)
|
|
|
panic("Fatal exception in interrupt");
|
|
|
if (panic_on_oops)
|
|
|
panic("Fatal exception");
|
|
|
- do_exit(signr);
|
|
|
+
|
|
|
+ /*
|
|
|
+ * We're not going to return, but we might be on an IST stack or
|
|
|
+ * have very little stack space left. Rewind the stack and kill
|
|
|
+ * the task.
|
|
|
+ */
|
|
|
+ rewind_stack_do_exit(signr);
|
|
|
}
|
|
|
NOKPROBE_SYMBOL(oops_end);
|
|
|
|