mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
Kernel: Don't disable interrupts while dealing with a process crash
This was necessary in the past when crash handling would modify various global things, but all that stuff is long gone so we can simplify crashes by leaving the interrupt flag alone.
This commit is contained in:
parent
0c4fbcae76
commit
8eeb8db2ed
Notes:
sideshowbarker
2024-07-18 21:55:42 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8eeb8db2ed4
@ -169,7 +169,6 @@ void handle_crash(RegisterState& regs, const char* description, int signal, bool
|
||||
PANIC("Crash in ring 0");
|
||||
}
|
||||
|
||||
cli();
|
||||
process->crash(signal, regs.eip, out_of_memory);
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,6 @@ void create_signal_trampoline()
|
||||
|
||||
void Process::crash(int signal, u32 eip, bool out_of_memory)
|
||||
{
|
||||
VERIFY_INTERRUPTS_DISABLED();
|
||||
VERIFY(!is_dead());
|
||||
VERIFY(Process::current() == this);
|
||||
|
||||
|
@ -696,7 +696,6 @@ inline const LogStream& operator<<(const LogStream& stream, const Process& proce
|
||||
do { \
|
||||
if (Process::current()->has_promises()) { \
|
||||
dbgln("Has made a promise"); \
|
||||
cli(); \
|
||||
Process::current()->crash(SIGABRT, 0); \
|
||||
VERIFY_NOT_REACHED(); \
|
||||
} \
|
||||
@ -707,7 +706,6 @@ inline const LogStream& operator<<(const LogStream& stream, const Process& proce
|
||||
if (Process::current()->has_promises() \
|
||||
&& !Process::current()->has_promised(Pledge::promise)) { \
|
||||
dbgln("Has not pledged {}", #promise); \
|
||||
cli(); \
|
||||
Process::current()->coredump_metadata().set( \
|
||||
"pledge_violation", #promise); \
|
||||
Process::current()->crash(SIGABRT, 0); \
|
||||
|
@ -32,7 +32,6 @@ namespace Kernel {
|
||||
|
||||
void Process::sys$abort()
|
||||
{
|
||||
cli();
|
||||
crash(SIGABRT, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user