[NTOS]: Move the fix for pool corruption due to dangling MmProcessLinks pointer into...
authorSir Richard <sir_richard@svn.reactos.org>
Sun, 12 Sep 2010 19:02:39 +0000 (19:02 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Sun, 12 Sep 2010 19:02:39 +0000 (19:02 +0000)
svn path=/trunk/; revision=48758

reactos/ntoskrnl/mm/procsup.c
reactos/ntoskrnl/ps/kill.c

index b550f50..7ed2374 100644 (file)
@@ -25,6 +25,8 @@ MmDeleteProcessAddressSpace(PEPROCESS Process)
    DPRINT("MmDeleteProcessAddressSpace(Process %x (%s))\n", Process,
           Process->ImageFileName);
 
+   RemoveEntryList(&Process->MmProcessLinks);
+
    MmLockAddressSpace(&Process->Vm);
 
    while ((MemoryArea = (PMEMORY_AREA)Process->Vm.WorkingSetExpansionLinks.Flink) != NULL)
index c1f9ce3..b1ea95f 100644 (file)
@@ -301,8 +301,6 @@ PspDeleteProcess(IN PVOID ObjectBody)
         /* Detach */
         KeUnstackDetachProcess(&ApcState);
 
-        RemoveEntryList(&Process->MmProcessLinks);
-
         /* Completely delete the Address Space */
         MmDeleteProcessAddressSpace(Process);
     }