return(STATUS_UNSUCCESSFUL);
}
Process = entry->Process;
+
+ if (!ExAcquireRundownProtection(&Process->RundownProtect))
+ {
+ ExReleaseFastMutex(&RmapListLock);
+ return STATUS_PROCESS_IS_TERMINATING;
+ }
+
Address = entry->Address;
if ((((ULONG_PTR)Address) & 0xFFF) != 0)
{
ExReleaseFastMutex(&RmapListLock);
if (!NT_SUCCESS(Status))
{
+ ExReleaseRundownProtection(&Process->RundownProtect);
return Status;
}
AddressSpace = &Process->Vm;
if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
{
MmUnlockAddressSpace(AddressSpace);
+ ExReleaseRundownProtection(&Process->RundownProtect);
if (Address < MmSystemRangeStart)
{
ObDereferenceObject(Process);
if (PageOp == NULL)
{
MmUnlockAddressSpace(AddressSpace);
+ ExReleaseRundownProtection(&Process->RundownProtect);
if (Address < MmSystemRangeStart)
{
ObDereferenceObject(Process);
if (PageOp == NULL)
{
MmUnlockAddressSpace(AddressSpace);
+ ExReleaseRundownProtection(&Process->RundownProtect);
if (Address < MmSystemRangeStart)
{
ObDereferenceObject(Process);
{
KeBugCheck(MEMORY_MANAGEMENT);
}
+
+ ExReleaseRundownProtection(&Process->RundownProtect);
+
if (Address < MmSystemRangeStart)
{
ObDereferenceObject(Process);
ExAcquireFastMutex(&RmapListLock);
previous_entry = NULL;
current_entry = MmGetRmapListHeadPage(Page);
+
while (current_entry != NULL)
{
if (current_entry->Process == (PEPROCESS)Process &&
}
ExReleaseFastMutex(&RmapListLock);
ExFreeToNPagedLookasideList(&RmapLookasideList, current_entry);
- if (Process == NULL)
- {
- Process = PsInitialSystemProcess;
- }
- if (Process)
- {
+ if (Process == NULL)
+ {
+ Process = PsInitialSystemProcess;
+ }
+ if (Process)
+ {
(void)InterlockedExchangeAddUL(&Process->Vm.WorkingSetSize, -PAGE_SIZE);
- }
+ }
return;
}
previous_entry = current_entry;