[NTOSKRNL]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 17 May 2015 00:35:23 +0000 (00:35 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 17 May 2015 00:35:23 +0000 (00:35 +0000)
Get rid of MiRosTakeOverSharedUserPage. We don't need it anymore, since the user page is manually handled in the page fault handler and since it's outside the VAD region, we don't need to block that range. Now there should be no memory areas left at all in MmDeleteProcessAddressSpace.

svn path=/trunk/; revision=67796

reactos/ntoskrnl/mm/ARM3/procsup.c
reactos/ntoskrnl/mm/marea.c

index a2a5584..961a00d 100644 (file)
@@ -24,25 +24,6 @@ SLIST_HEADER MmDeadStackSListHead;
 
 /* PRIVATE FUNCTIONS **********************************************************/
 
-VOID
-NTAPI
-MiRosTakeOverSharedUserPage(IN PEPROCESS Process)
-{
-    NTSTATUS Status;
-    PMEMORY_AREA MemoryArea;
-    PVOID AllocatedBase = (PVOID)MM_SHARED_USER_DATA_VA;
-
-    Status = MmCreateMemoryArea(&Process->Vm,
-                                MEMORY_AREA_OWNED_BY_ARM3,
-                                &AllocatedBase,
-                                PAGE_SIZE,
-                                PAGE_READWRITE,
-                                &MemoryArea,
-                                0,
-                                PAGE_SIZE);
-    ASSERT(NT_SUCCESS(Status));
-}
-
 NTSTATUS
 NTAPI
 MiCreatePebOrTeb(IN PEPROCESS Process,
@@ -973,9 +954,6 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process,
     /* Release PFN lock */
     KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
 
-    /* Lock the VAD, ARM3-owned ranges away */
-    MiRosTakeOverSharedUserPage(Process);
-
     /* Check if there's a Section Object */
     if (SectionObject)
     {
@@ -1077,7 +1055,6 @@ INIT_FUNCTION
 MmInitializeHandBuiltProcess2(IN PEPROCESS Process)
 {
     /* Lock the VAD, ARM3-owned ranges away */
-    MiRosTakeOverSharedUserPage(Process);
     return STATUS_SUCCESS;
 }
 
index 3844def..008c6a0 100644 (file)
@@ -1173,7 +1173,6 @@ NTAPI
 MmDeleteProcessAddressSpace(PEPROCESS Process)
 {
     PVOID Address;
-    PMEMORY_AREA MemoryArea;
 
     DPRINT("MmDeleteProcessAddressSpace(Process %p (%s))\n", Process,
            Process->ImageFileName);
@@ -1183,16 +1182,8 @@ MmDeleteProcessAddressSpace(PEPROCESS Process)
 #endif
     MmLockAddressSpace(&Process->Vm);
 
-    while ((MemoryArea = (PMEMORY_AREA)Process->Vm.WorkingSetExpansionLinks.Flink) != NULL)
-    {
-        /* There should be nothing else left */
-        ASSERT(MemoryArea->Type == MEMORY_AREA_OWNED_BY_ARM3);
-
-        MmFreeMemoryArea(&Process->Vm,
-                         MemoryArea,
-                         NULL,
-                         NULL);
-    }
+    /* There should not be any memory areas left! */
+    ASSERT(Process->Vm.WorkingSetExpansionLinks.Flink == NULL);
 
 #if (_MI_PAGING_LEVELS == 2)
     {