[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
This commit is contained in:
Justin Miller 2024-08-31 13:18:07 -07:00 committed by GitHub
parent 3f54e0e504
commit 49e07292ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -386,7 +386,6 @@ FORCEINLINE
VOID VOID
KiRundownThread(IN PKTHREAD Thread) KiRundownThread(IN PKTHREAD Thread)
{ {
#ifndef CONFIG_SMP
/* Check if this is the NPX Thread */ /* Check if this is the NPX Thread */
if (KeGetCurrentPrcb()->NpxThread == Thread) if (KeGetCurrentPrcb()->NpxThread == Thread)
{ {
@ -394,9 +393,6 @@ KiRundownThread(IN PKTHREAD Thread)
KeGetCurrentPrcb()->NpxThread = NULL; KeGetCurrentPrcb()->NpxThread = NULL;
Ke386FnInit(); Ke386FnInit();
} }
#else
/* Nothing to do */
#endif
} }
CODE_SEG("INIT") CODE_SEG("INIT")