Fix bug #4249 and crash in QEMU. Alex Ionescu, bug #4249.

svn path=/trunk/; revision=39934
This commit is contained in:
Dmitry Gorbachev 2009-03-10 17:47:11 +00:00
parent 02a00d8520
commit df00880ca7
2 changed files with 6 additions and 6 deletions

View file

@ -1086,7 +1086,7 @@ MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size)
if (Process != NULL && Process != PsGetCurrentProcess())
{
Pde = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0]));
Pde = MiMapPagesToZeroInHyperSpace(PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0]));
}
else
{
@ -1101,7 +1101,7 @@ MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size)
}
if (Pde != (PULONG)PAGEDIRECTORY_MAP)
{
MmDeleteHyperspaceMapping(Pde);
MiUnmapPagesInZeroSpace(Pde);
}
}

View file

@ -691,7 +691,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
return Status;
}
}
PageAddr = MmCreateHyperspaceMapping(*Page);
PageAddr = MiMapPagesToZeroInHyperSpace(*Page);
CacheSegOffset = BaseOffset + CacheSeg->Bcb->CacheSegmentSize - FileOffset;
Length = RawLength - SegOffset;
if (Length <= CacheSegOffset && Length <= PAGE_SIZE)
@ -714,7 +714,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
&CacheSeg);
if (!NT_SUCCESS(Status))
{
MmDeleteHyperspaceMapping(PageAddr);
MiUnmapPagesInZeroSpace(PageAddr);
return(Status);
}
if (!UptoDate)
@ -727,7 +727,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
if (!NT_SUCCESS(Status))
{
CcRosReleaseCacheSegment(Bcb, CacheSeg, FALSE, FALSE, FALSE);
MmDeleteHyperspaceMapping(PageAddr);
MiUnmapPagesInZeroSpace(PageAddr);
return Status;
}
}
@ -741,7 +741,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
}
}
CcRosReleaseCacheSegment(Bcb, CacheSeg, TRUE, FALSE, FALSE);
MmDeleteHyperspaceMapping(PageAddr);
MiUnmapPagesInZeroSpace(PageAddr);
}
return(STATUS_SUCCESS);
}