Author: sginsberg
Date: Thu Aug 14 11:43:52 2008
New Revision: 35342
URL:
http://svn.reactos.org/svn/reactos?rev=35342&view=rev
Log:
- Fix MiSyncThreadProcessViews to hack-sync the next thread's ETHREAD too (spotted by
Alex)
Modified:
trunk/reactos/ntoskrnl/mm/mm.c
Modified: trunk/reactos/ntoskrnl/mm/mm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mm.c?rev=35342…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mm.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/mm.c [iso-8859-1] Thu Aug 14 11:43:52 2008
@@ -28,12 +28,14 @@
FASTCALL
MiSyncThreadProcessViews(IN PKTHREAD NextThread)
{
+ PVOID Process = PsGetCurrentProcess();
+ PETHREAD Thread = CONTAINING_RECORD(NextThread, ETHREAD, Tcb);
+
/* Hack Sync because Mm is broken */
- MmUpdatePageDir(PsGetCurrentProcess(),
- ((PETHREAD)NextThread)->ThreadsProcess,
- sizeof(EPROCESS));
- MmUpdatePageDir(PsGetCurrentProcess(),
- (PVOID)((PETHREAD)NextThread)->Tcb.StackLimit,
+ MmUpdatePageDir(Process, Thread, sizeof(ETHREAD));
+ MmUpdatePageDir(Process, Thread->ThreadsProcess, sizeof(EPROCESS));
+ MmUpdatePageDir(Process,
+ (PVOID)Thread->Tcb.StackLimit,
NextThread->LargeStack ?
KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE);
}