From 925c3a133b29d8f0f748a22189dea50e169d96ab Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 7 Aug 2019 23:52:03 -0400 Subject: [PATCH] kernel/thread: Check the proper field to determine if the thread is blocked. Fixes #15234. --- src/system/kernel/thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/thread.cpp b/src/system/kernel/thread.cpp index bcbde99b96..a893434374 100644 --- a/src/system/kernel/thread.cpp +++ b/src/system/kernel/thread.cpp @@ -2987,7 +2987,7 @@ user_unblock_thread(thread_id threadID, status_t status) // Even if the user_thread->wait_status was > 0, it may be the // case that this thread is actually blocked on something else. - if (thread->state == B_THREAD_WAITING + if (thread->wait.status > 0 && thread->wait.type == THREAD_BLOCK_TYPE_USER) { thread_unblock_locked(thread, status); }