From 3bedf56512c30f92bfd40f128f87921027bcdafa Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 13 Jul 2021 05:27:19 -0700 Subject: [PATCH] kern: fix incorrect waiter management in KProcess::ReleaseUserException --- libraries/libmesosphere/source/kern_k_process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/libmesosphere/source/kern_k_process.cpp b/libraries/libmesosphere/source/kern_k_process.cpp index dacd1303e..ba1defba9 100644 --- a/libraries/libmesosphere/source/kern_k_process.cpp +++ b/libraries/libmesosphere/source/kern_k_process.cpp @@ -804,7 +804,7 @@ namespace ams::kern { /* Remove waiter thread. */ s32 num_waiters; - if (KThread *next = thread->RemoveWaiterByKey(std::addressof(num_waiters), reinterpret_cast(std::addressof(m_exception_thread))); next != nullptr) { + if (KThread *next = thread->RemoveWaiterByKey(std::addressof(num_waiters), reinterpret_cast(std::addressof(m_exception_thread)) | 1); next != nullptr) { next->SetState(KThread::ThreadState_Runnable); }