mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +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,12 +306,6 @@ void Thread::consider_unblock(time_t now_sec, long now_usec)
|
|||
unblock();
|
||||
return;
|
||||
}
|
||||
case Thread::Skip1SchedulerPass:
|
||||
set_state(Thread::Skip0SchedulerPasses);
|
||||
return;
|
||||
case Thread::Skip0SchedulerPasses:
|
||||
set_state(Thread::Runnable);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue