diff options
author | Andreas Kling <kling@serenityos.org> | 2022-01-24 17:16:52 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-24 17:19:41 +0100 |
commit | e04e52186d5d4c4c0eb2f29420a8a59a64869a96 (patch) | |
tree | bcc4685618c6c2f69a2c4b65e3bcb5dd33c8d1c9 /Kernel/Arch/x86/common | |
parent | 2b3790100a3d4f0b8c51e8d7d7a58a0877c545bc (diff) | |
download | serenity-e04e52186d5d4c4c0eb2f29420a8a59a64869a96.zip |
Kernel: Don't send crash signal to process itself when it has no handler
If there's nobody listening for the crash signal, fall back to the
normal crash path where we get some debug output about what happened.
Thanks to Idan for suggesting the fix.
Diffstat (limited to 'Kernel/Arch/x86/common')
-rw-r--r-- | Kernel/Arch/x86/common/Interrupts.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Arch/x86/common/Interrupts.cpp b/Kernel/Arch/x86/common/Interrupts.cpp index 88dddd5d78..0575154b60 100644 --- a/Kernel/Arch/x86/common/Interrupts.cpp +++ b/Kernel/Arch/x86/common/Interrupts.cpp @@ -220,7 +220,7 @@ void handle_crash(RegisterState const& regs, char const* description, int signal PANIC("{} with !Thread::current()", description); auto crashed_in_kernel = (regs.cs & 3) == 0; - if (!crashed_in_kernel && !current_thread->should_ignore_signal(signal) && !current_thread->is_signal_masked(signal)) { + if (!crashed_in_kernel && current_thread->has_signal_handler(signal) && !current_thread->should_ignore_signal(signal) && !current_thread->is_signal_masked(signal)) { current_thread->send_urgent_signal_to_self(signal); return; } |