summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-16 15:17:32 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-16 15:18:47 +0200
commit3108aa0a6b7b497bd6f9aadf4da81246349fa347 (patch)
treea9e318d809dde5cb17f56071f8376b888c8e1bf3 /Kernel
parent4812b957952dbac912c6436bf82785aa41fd2443 (diff)
downloadserenity-3108aa0a6b7b497bd6f9aadf4da81246349fa347.zip
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! :^)
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/ThreadBlockers.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/ThreadBlockers.cpp b/Kernel/ThreadBlockers.cpp
index 9724b8b3c6..c79afcc387 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);