mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 12:23:14 +00:00
[NTOS:MM] Fix locking when paging out
This commit is contained in:
parent
d8cdb89fb0
commit
d932bdb950
1 changed files with 13 additions and 7 deletions
|
@ -70,7 +70,7 @@ MmPageOutPhysicalAddress(PFN_NUMBER Page)
|
||||||
if (entry == NULL)
|
if (entry == NULL)
|
||||||
{
|
{
|
||||||
MiReleasePfnLock(OldIrql);
|
MiReleasePfnLock(OldIrql);
|
||||||
return STATUS_UNSUCCESSFUL;
|
goto WriteSegment;
|
||||||
}
|
}
|
||||||
|
|
||||||
Process = entry->Process;
|
Process = entry->Process;
|
||||||
|
@ -176,6 +176,12 @@ MmPageOutPhysicalAddress(PFN_NUMBER Page)
|
||||||
MmSetDirtyPage(Process, Address);
|
MmSetDirtyPage(Process, Address);
|
||||||
|
|
||||||
MmUnlockAddressSpace(AddressSpace);
|
MmUnlockAddressSpace(AddressSpace);
|
||||||
|
if (Address < MmSystemRangeStart)
|
||||||
|
{
|
||||||
|
ExReleaseRundownProtection(&Process->RundownProtect);
|
||||||
|
ObDereferenceObject(Process);
|
||||||
|
}
|
||||||
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,6 +205,11 @@ MmPageOutPhysicalAddress(PFN_NUMBER Page)
|
||||||
MmSetDirtyPage(Process, Address);
|
MmSetDirtyPage(Process, Address);
|
||||||
|
|
||||||
MmUnlockAddressSpace(AddressSpace);
|
MmUnlockAddressSpace(AddressSpace);
|
||||||
|
if (Address < MmSystemRangeStart)
|
||||||
|
{
|
||||||
|
ExReleaseRundownProtection(&Process->RundownProtect);
|
||||||
|
ObDereferenceObject(Process);
|
||||||
|
}
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,12 +267,7 @@ MmPageOutPhysicalAddress(PFN_NUMBER Page)
|
||||||
KeBugCheck(MEMORY_MANAGEMENT);
|
KeBugCheck(MEMORY_MANAGEMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Address < MmSystemRangeStart)
|
WriteSegment:
|
||||||
{
|
|
||||||
ExReleaseRundownProtection(&Process->RundownProtect);
|
|
||||||
ObDereferenceObject(Process);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now write this page to file, if needed */
|
/* Now write this page to file, if needed */
|
||||||
Segment = MmGetSectionAssociation(Page, &SegmentOffset);
|
Segment = MmGetSectionAssociation(Page, &SegmentOffset);
|
||||||
if (Segment)
|
if (Segment)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue