From 3f003e294ebed759e6320d1bd1a6ff6cb0d7633d Mon Sep 17 00:00:00 2001 From: Sir Richard Date: Sun, 12 Sep 2010 19:02:39 +0000 Subject: [PATCH] [NTOS]: Move the fix for pool corruption due to dangling MmProcessLinks pointer into its correct location. Thanks again to Martin for the fix. svn path=/trunk/; revision=48758 --- reactos/ntoskrnl/mm/procsup.c | 2 ++ reactos/ntoskrnl/ps/kill.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/mm/procsup.c b/reactos/ntoskrnl/mm/procsup.c index b550f508b36..7ed23748dc6 100644 --- a/reactos/ntoskrnl/mm/procsup.c +++ b/reactos/ntoskrnl/mm/procsup.c @@ -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) diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index c1f9ce33cb6..b1ea95fb361 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -301,8 +301,6 @@ PspDeleteProcess(IN PVOID ObjectBody) /* Detach */ KeUnstackDetachProcess(&ApcState); - RemoveEntryList(&Process->MmProcessLinks); - /* Completely delete the Address Space */ MmDeleteProcessAddressSpace(Process); }