mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 11:47:35 +00:00
Kernel: Fix crash when delivering signal to barely created thread
We need to wait until a thread is fully set up and ready for running before attempting to deliver a signal. Otherwise we may not have a user stack yet. Also, remove the Skip0SchedulerPasses and Skip1SchedulerPass thread states that we don't really need anymore with software context switching. Fixes the kernel crash reported in #3419
This commit is contained in:
parent
f1a65d1d70
commit
c3d231616c
5 changed files with 32 additions and 21 deletions
|
@ -306,7 +306,7 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
|
|||
if (was_profiling)
|
||||
Profiling::did_exec(path);
|
||||
|
||||
new_main_thread->set_state(Thread::State::Skip1SchedulerPass);
|
||||
new_main_thread->set_state(Thread::State::Runnable);
|
||||
big_lock().force_unlock_if_locked();
|
||||
ASSERT_INTERRUPTS_DISABLED();
|
||||
ASSERT(Processor::current().in_critical());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue