mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[PATCH] avoid resursive oopses
Prevent recursive faults in do_exit() by leaving the task alone and wait for reboot. This may allow a more graceful shutdown and possibly save the original oops. Signed-off-by: Alexander Nyberg <alexn@telia.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
5f45f1a78f
commit
df164db5fd
1 changed files with 11 additions and 0 deletions
|
@ -793,6 +793,17 @@ fastcall NORET_TYPE void do_exit(long code)
|
|||
ptrace_notify((PTRACE_EVENT_EXIT << 8) | SIGTRAP);
|
||||
}
|
||||
|
||||
/*
|
||||
* We're taking recursive faults here in do_exit. Safest is to just
|
||||
* leave this task alone and wait for reboot.
|
||||
*/
|
||||
if (unlikely(tsk->flags & PF_EXITING)) {
|
||||
printk(KERN_ALERT
|
||||
"Fixing recursive fault but reboot is needed!\n");
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
schedule();
|
||||
}
|
||||
|
||||
tsk->flags |= PF_EXITING;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue