mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTOS] Improve MmCleanProcessAddressSpace
This commit is contained in:
parent
9fc56bfc9d
commit
10fbefdeb0
1 changed files with 8 additions and 3 deletions
|
@ -1270,12 +1270,17 @@ MmCleanProcessAddressSpace(IN PEPROCESS Process)
|
|||
PMM_AVL_TABLE VadTree;
|
||||
PETHREAD Thread = PsGetCurrentThread();
|
||||
|
||||
/* Only support this */
|
||||
ASSERT(Process->AddressSpaceInitialized == 2);
|
||||
|
||||
/* Remove from the session */
|
||||
MiSessionRemoveProcess();
|
||||
|
||||
/* Abort early, when the address space wasn't fully initialized */
|
||||
if (Process->AddressSpaceInitialized < 2)
|
||||
{
|
||||
DPRINT1("Incomplete address space for Process %p. Might leak resources.\n",
|
||||
Process);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Lock the process address space from changes */
|
||||
MmLockAddressSpace(&Process->Vm);
|
||||
MiLockProcessWorkingSetUnsafe(Process, Thread);
|
||||
|
|
Loading…
Reference in a new issue