From 3108aa0a6b7b497bd6f9aadf4da81246349fa347 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 16 Jul 2021 15:17:32 +0200 Subject: [PATCH] Kernel: Fix bogus check in Thread::WaitBlockCondition::finalize() I botched this in 859e5741ffd3c5be57a3c3ef4c08c6372e2ff35c, the check was supposed to be with Process::is_kernel_process(). This fixes an issue with zombie processes hanging around forever. Thanks tomuta for spotting it! :^) --- Kernel/ThreadBlockers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/ThreadBlockers.cpp b/Kernel/ThreadBlockers.cpp index 9724b8b3c61..c79afcc387b 100644 --- a/Kernel/ThreadBlockers.cpp +++ b/Kernel/ThreadBlockers.cpp @@ -581,7 +581,7 @@ void Thread::WaitBlockCondition::finalize() m_processes.clear(); // NOTE: Kernel processes don't have a leaked ref on them. - if (!is_kernel_mode()) { + if (!m_process.is_kernel_process()) { // No more waiters, drop the last reference immediately. This may // cause us to be destructed ourselves! VERIFY(m_process.ref_count() > 0);