Kernel: Fix bogus check in Thread::WaitBlockCondition::finalize()

I botched this in 859e5741ff, 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! :^)
This commit is contained in:
Andreas Kling 2021-07-16 15:17:32 +02:00
parent 4812b95795
commit 3108aa0a6b
Notes: sideshowbarker 2024-07-18 08:56:10 +09:00

View file

@ -581,7 +581,7 @@ void Thread::WaitBlockCondition::finalize()
m_processes.clear(); m_processes.clear();
// NOTE: Kernel processes don't have a leaked ref on them. // 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 // No more waiters, drop the last reference immediately. This may
// cause us to be destructed ourselves! // cause us to be destructed ourselves!
VERIFY(m_process.ref_count() > 0); VERIFY(m_process.ref_count() > 0);