1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

Kernel: Fix kernel panic when blocking on the process' big lock

Another thread might end up marking the blocking thread as holding
the lock before it gets a chance to finish invoking the scheduler.
This commit is contained in:
Gunnar Beutner 2021-08-10 21:20:45 +02:00 committed by Andreas Kling
parent 309a20c014
commit 3322efd4cd
3 changed files with 17 additions and 8 deletions

View file

@ -12,7 +12,7 @@ KResultOr<FlatPtr> Process::sys$yield()
{
VERIFY_NO_PROCESS_BIG_LOCK(this);
REQUIRE_PROMISE(stdio);
Thread::current()->yield_assuming_not_holding_big_lock();
Thread::current()->yield_without_releasing_big_lock();
return 0;
}