From 49e07292edb09a3739a172e3caee4d053dce85a7 Mon Sep 17 00:00:00 2001 From: Justin Miller Date: Sat, 31 Aug 2024 13:18:07 -0700 Subject: [PATCH] [NTOS:KE] Clear NpxThread on rundown for SMP as well (#7151) clear NpxThread on rundown for SMP as well Fixes the crash whenever a usermode thread is destroyed on x86 --- ntoskrnl/include/internal/i386/ke.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ntoskrnl/include/internal/i386/ke.h b/ntoskrnl/include/internal/i386/ke.h index 01cef59b053..81194e91e0e 100644 --- a/ntoskrnl/include/internal/i386/ke.h +++ b/ntoskrnl/include/internal/i386/ke.h @@ -386,7 +386,6 @@ FORCEINLINE VOID KiRundownThread(IN PKTHREAD Thread) { -#ifndef CONFIG_SMP /* Check if this is the NPX Thread */ if (KeGetCurrentPrcb()->NpxThread == Thread) { @@ -394,9 +393,6 @@ KiRundownThread(IN PKTHREAD Thread) KeGetCurrentPrcb()->NpxThread = NULL; Ke386FnInit(); } -#else - /* Nothing to do */ -#endif } CODE_SEG("INIT")