From 2b7fc5b41d41cb79e3eac9823176d90f26e0607e Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Wed, 1 Jul 2026 18:45:03 +0200 Subject: [PATCH] Fix swapped arguments in queued spinlock release --- xtoskrnl/ke/spinlock.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xtoskrnl/ke/spinlock.cc b/xtoskrnl/ke/spinlock.cc index 725985e..a5131b3 100644 --- a/xtoskrnl/ke/spinlock.cc +++ b/xtoskrnl/ke/spinlock.cc @@ -263,7 +263,7 @@ KE::SpinLock::ReleaseQueuedSpinLock(IN PKSPIN_LOCK_QUEUE LockQueue) if(!NextLockQueue) { /* Remove the lock */ - if(RTL::Atomic::CompareExchangePointer((PVOID *)LockQueue->Lock, NULLPTR, LockQueue) == LockQueue) + if(RTL::Atomic::CompareExchangePointer((PVOID *)LockQueue->Lock, LockQueue, NULLPTR) == LockQueue) { /* Lock removed, exit */ return;