[NTOS:KE] Use PNT_TIB as argument in KeSetTebBase

This commit is contained in:
Jérôme Gardou 2021-03-11 16:26:28 +01:00
parent 8f963c38c6
commit 187ca32175
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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;