https://git.reactos.org/?p=reactos.git;a=commitdiff;h=187ca32175062f666c554…
commit 187ca32175062f666c55464802c31db40ad59980
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Thu Mar 11 16:26:28 2021 +0100
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Wed Mar 24 11:09:20 2021 +0100
[NTOS:KE] Use PNT_TIB as argument in KeSetTebBase
---
ntoskrnl/include/internal/i386/ke.h | 2 +-
ntoskrnl/ke/i386/thrdini.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/include/internal/i386/ke.h b/ntoskrnl/include/internal/i386/ke.h
index 021a379472f..e7152395c92 100644
--- a/ntoskrnl/include/internal/i386/ke.h
+++ b/ntoskrnl/include/internal/i386/ke.h
@@ -315,7 +315,7 @@ Ke386SetGdtEntryBase(PKGDTENTRY GdtEntry, PVOID BaseAddress)
FORCEINLINE
VOID
-KiSetTebBase(PKPCR Pcr, PVOID TebAddress)
+KiSetTebBase(PKPCR Pcr, PNT_TIB TebAddress)
{
Pcr->NtTib.Self = TebAddress;
Ke386SetGdtEntryBase(&Pcr->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)], TebAddress);
diff --git a/ntoskrnl/ke/i386/thrdini.c b/ntoskrnl/ke/i386/thrdini.c
index bb90f78cadf..11bf02de2fb 100644
--- a/ntoskrnl/ke/i386/thrdini.c
+++ b/ntoskrnl/ke/i386/thrdini.c
@@ -363,7 +363,7 @@ KiSwapContextExit(IN PKTHREAD OldThread,
Ke386SetGs(0);
/* Set the TEB */
- KiSetTebBase((PKPCR)Pcr, NewThread->Teb);
+ KiSetTebBase((PKPCR)Pcr, &NewThread->Teb->NtTib);
/* Set new TSS fields */
Pcr->TSS->Esp0 = (ULONG_PTR)NewThread->InitialStack;