From 24d124f99f20db1a455585aa975eb64249060285 Mon Sep 17 00:00:00 2001 From: Justin Miller Date: Sat, 26 Mar 2022 22:22:45 -0700 Subject: [PATCH] [NTOS] Set SwapBusy properly for i386 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hermès BÉLUSCA - MAÏTO --- ntoskrnl/ke/i386/thrdini.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ntoskrnl/ke/i386/thrdini.c b/ntoskrnl/ke/i386/thrdini.c index ae9a599a8e2..cfc497bfc69 100644 --- a/ntoskrnl/ke/i386/thrdini.c +++ b/ntoskrnl/ke/i386/thrdini.c @@ -427,6 +427,9 @@ KiSwapContextEntry(IN PKSWITCHFRAME SwitchFrame, /* Get the old thread and set its kernel stack */ OldThread->KernelStack = SwitchFrame; + /* Set swapbusy to false for the new thread */ + NewThread->SwapBusy = FALSE; + /* ISRs can change FPU state, so disable interrupts while checking */ _disable();