1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00

Revert "Kernel: Make sure threads which don't do any syscalls are t..."

This reverts commit 3c3a1726df.

We cannot blindly kill threads just because they're not executing in a
system call. Being blocked (including in a page fault) needs proper
unblocking and potentially kernel stack cleanup before we can mark a
thread as Dying.

Fixes #8691
This commit is contained in:
Tom 2021-07-13 10:11:33 -06:00 committed by Andreas Kling
parent 552185066e
commit fa8fe40266
3 changed files with 0 additions and 19 deletions

View file

@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/ScopeGuard.h>
#include <Kernel/API/Syscall.h>
#include <Kernel/Arch/x86/Interrupts.h>
#include <Kernel/Arch/x86/TrapFrame.h>
@ -154,14 +153,6 @@ NEVER_INLINE void syscall_handler(TrapFrame* trap)
{
auto& regs = *trap->regs;
auto current_thread = Thread::current();
{
ScopedSpinLock lock(g_scheduler_lock);
current_thread->set_may_die_immediately(false);
}
ScopeGuard reset_may_die_immediately = [&current_thread] {
ScopedSpinLock lock(g_scheduler_lock);
current_thread->set_may_die_immediately(true);
};
VERIFY(current_thread->previous_mode() == Thread::PreviousMode::UserMode);
auto& process = current_thread->process();