Author: sir_richard
Date: Tue Nov 2 14:41:03 2010
New Revision: 49434
URL:
http://svn.reactos.org/svn/reactos?rev=49434&view=rev
Log:
[NTOS]: Sanity checks when dealing with creating/cleaning process address space.
[NTOS]: Set the VmDeleted flag when the process address space is being nuked.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Tue Nov 2 14:41:03 2010
@@ -190,6 +190,7 @@
ASSERT((Vad->StartingVpn == ((ULONG_PTR)Teb >> PAGE_SHIFT) &&
(Vad->EndingVpn == (TebEnd >> PAGE_SHIFT))));
ASSERT(Vad->u.VadFlags.NoChange == TRUE);
+ ASSERT(Vad->u2.VadFlags2.OneSecured == TRUE);
ASSERT(Vad->u2.VadFlags2.MultipleSecured == FALSE);
/* Lock the working set */
@@ -1169,8 +1170,14 @@
PMM_AVL_TABLE VadTree;
PETHREAD Thread = PsGetCurrentThread();
+ /* Only support this */
+ ASSERT(Process->AddressSpaceInitialized == 2);
+
/* Lock the process address space from changes */
MmLockAddressSpace(&Process->Vm);
+
+ /* VM is deleted now */
+ Process->VmDeleted = TRUE;
/* Enumerate the VADs */
VadTree = &Process->VadRoot;