- Add missing wait entry handling

svn path=/trunk/; revision=56022
This commit is contained in:
Cameron Gutman 2012-03-04 23:45:16 +00:00
parent 3f0a38fdc9
commit ea50be62a0
2 changed files with 19 additions and 1 deletions

View file

@ -158,11 +158,23 @@ MmNotPresentFaultCachePage
return Status;
}
}
else if (MM_IS_WAIT_PTE(Entry))
{
MmUnlockSectionSegment(Segment);
return STATUS_SUCCESS + 1;
}
else if (Entry)
{
PFN_NUMBER Page = PFN_FROM_SSE(Entry);
DPRINT("Take reference to page %x #\n", Page);
if (MiGetPfnEntry(Page) == NULL)
{
DPRINT1("Found no PFN entry for page 0x%x in page entry 0x%x (segment: 0x%p, offset: %08x%08x)\n",
Page, Entry, Segment, TotalOffset.HighPart, TotalOffset.LowPart);
KeBugCheck(CACHE_MANAGER);
}
MmReferencePage(Page);
Status = MmCreateVirtualMapping(Process, Address, Attributes, &Page, 1);

View file

@ -204,6 +204,12 @@ MmPageOutCacheSection
Entry = MmGetPageEntrySectionSegment(Segment, &TotalOffset);
if (MM_IS_WAIT_PTE(Entry))
{
MmUnlockSectionSegment(Segment);
return STATUS_SUCCESS + 1;
}
if (Dirty) {
DPRINT("Dirty page: %p:%p segment %p offset %08x%08x\n", Process, Address, Segment, TotalOffset.HighPart, TotalOffset.LowPart);
MmSetPageEntrySectionSegment(Segment, &TotalOffset, DIRTY_SSE(Entry));
@ -362,7 +368,7 @@ MmpPageOutPhysicalAddress(PFN_NUMBER Page)
if (Status == STATUS_SUCCESS + 1)
{
// Wait page ... the other guy has it, so we'll just fail for now
DPRINTC("Wait entry ... can't continue\n");
DPRINT1("Wait entry ... can't continue\n");
Status = STATUS_UNSUCCESSFUL;
goto bail;
}