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;
Author: sir_richard
Date: Tue Nov 2 14:40:31 2010
New Revision: 49433
URL: http://svn.reactos.org/svn/reactos?rev=49433&view=rev
Log:
[NTOS]: Make sure we don't get a user-pointer back from MmMapInSystemSpace.
Modified:
trunk/reactos/ntoskrnl/ex/init.c
Modified: trunk/reactos/ntoskrnl/ex/init.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=494…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Tue Nov 2 14:40:31 2010
@@ -329,6 +329,7 @@
}
/* Copy the codepage data in its new location. */
+ ASSERT(SectionBase > MmSystemRangeStart);
RtlCopyMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize);
/* Free the previously allocated buffer and set the new location */