serenity/Kernel/Locking
Jelle Raaijmakers 7826729ab2 Kernel: Track big lock blocked threads in separate list
When we lock a mutex, eventually `Thread::block` is invoked which could
in turn invoke `Process::big_lock().restore_exclusive_lock()`. This
would then try to add the current thread to a different blocked thread
list then the one in use for the original mutex being locked, and
because it's an intrusive list, the thread is removed from its original
list during the `.append()`. When the original mutex eventually
unblocks, we no longer have the thread in the intrusive blocked threads
list and we panic.

Solve this by making the big lock mutex special and giving it its own
blocked thread list. Because the process big lock is temporary and is
being actively removed from e.g. syscalls, it's a matter of time before
we can also remove the fix introduced by this commit.

Fixes issue #9401.
2022-04-06 18:27:19 +02:00
..
LockLocation.h Kernel: Add missing includes in Locking 2021-12-15 23:34:11 -08:00
LockMode.h Kernel: Add missing includes in Locking 2021-12-15 23:34:11 -08:00
LockRank.cpp Kernel: Add implied auto-specifiers in Locking 2021-12-15 23:34:11 -08:00
LockRank.h Kernel: Fix a typo in LockRank::Process's comment 2021-09-08 19:17:07 +03:00
Mutex.cpp Kernel: Track big lock blocked threads in separate list 2022-04-06 18:27:19 +02:00
Mutex.h Kernel: Track big lock blocked threads in separate list 2022-04-06 18:27:19 +02:00
MutexProtected.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Spinlock.h Kernel: Move spinlock into Arch 2021-10-15 21:48:45 +01:00
SpinlockProtected.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00