mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 19:07:15 +03:00
Kernel: Unlock ptrace lock before entering a critical section in execve
While it might not be as bad to release a mutex while interrupts are disabled as it is to acquire one, we don't want to mess with that.
This commit is contained in:
parent
8e70b85215
commit
70518e69f4
Notes:
sideshowbarker
2024-07-18 05:08:49 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/70518e69f40 Pull-request: https://github.com/SerenityOS/serenity/pull/9580 Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/bgianfo
@ -626,6 +626,7 @@ KResult Process::do_exec(NonnullRefPtr<FileDescription> main_program_description
|
|||||||
ptrace_locker.unlock();
|
ptrace_locker.unlock();
|
||||||
Thread::current()->send_urgent_signal_to_self(SIGSTOP);
|
Thread::current()->send_urgent_signal_to_self(SIGSTOP);
|
||||||
}
|
}
|
||||||
|
ptrace_locker.unlock(); // unlock before disabling interrupts as well
|
||||||
|
|
||||||
// We enter a critical section here because we don't want to get interrupted between do_exec()
|
// We enter a critical section here because we don't want to get interrupted between do_exec()
|
||||||
// and Processor::assume_context() or the next context switch.
|
// and Processor::assume_context() or the next context switch.
|
||||||
|
Loading…
Reference in New Issue
Block a user