diff options
author | Tom <tomut@yahoo.com> | 2020-09-07 08:31:00 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-07 16:49:19 +0200 |
commit | c3d231616c1d20309b2b568f383fbcb736887dad (patch) | |
tree | a2a84f86d0cf91f7baf77616dca5dbeda5fd7e6d /Kernel/Scheduler.cpp | |
parent | f1a65d1d70da913af961761d3d2aa53455bd1cc0 (diff) | |
download | serenity-c3d231616c1d20309b2b568f383fbcb736887dad.zip |
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
Diffstat (limited to 'Kernel/Scheduler.cpp')
-rw-r--r-- | Kernel/Scheduler.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index 7d0a477903..620558caf7 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -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; } } |