From 748a2e165534e107492a2c97c231deb3e5d79bbc Mon Sep 17 00:00:00 2001 From: Justin Miller Date: Sat, 20 Jan 2024 08:59:13 -0800 Subject: [PATCH] [NTOS] Fix boot on UP build - PrcbLocks are not used on UP (#6391) On the uniprocessor kernel KiAcquirePrcbLock is a stub that doesn't modify the current Prcb's PrcbLock value. Quickly protect this assert around CONFIG_SMP --- ntoskrnl/include/internal/ke_x.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ntoskrnl/include/internal/ke_x.h b/ntoskrnl/include/internal/ke_x.h index fcf3edb2786..ae431649773 100644 --- a/ntoskrnl/include/internal/ke_x.h +++ b/ntoskrnl/include/internal/ke_x.h @@ -1359,7 +1359,9 @@ KxQueueReadyThread(IN PKTHREAD Thread, /* Sanity checks */ ASSERT(Prcb == KeGetCurrentPrcb()); +#ifdef CONFIG_SMP ASSERT(Prcb->PrcbLock != 0); +#endif ASSERT(Thread->State == Running); ASSERT(Thread->NextProcessor == Prcb->Number);