Author: dgorbachev Date: Tue Mar 10 20:47:11 2009 New Revision: 39934
URL: http://svn.reactos.org/svn/reactos?rev=39934&view=rev Log: Fix bug #4249 and crash in QEMU. Alex Ionescu, bug #4249.
Modified: trunk/reactos/ntoskrnl/mm/i386/page.c trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/mm/i386/page.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?rev... ============================================================================== --- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Tue Mar 10 20:47:11 2009 @@ -1086,7 +1086,7 @@
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 @@ } if (Pde != (PULONG)PAGEDIRECTORY_MAP) { - MmDeleteHyperspaceMapping(Pde); + MiUnmapPagesInZeroSpace(Pde); } }
Modified: trunk/reactos/ntoskrnl/mm/section.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=3... ============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Tue Mar 10 20:47:11 2009 @@ -691,7 +691,7 @@ 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 @@ &CacheSeg); if (!NT_SUCCESS(Status)) { - MmDeleteHyperspaceMapping(PageAddr); + MiUnmapPagesInZeroSpace(PageAddr); return(Status); } if (!UptoDate) @@ -727,7 +727,7 @@ if (!NT_SUCCESS(Status)) { CcRosReleaseCacheSegment(Bcb, CacheSeg, FALSE, FALSE, FALSE); - MmDeleteHyperspaceMapping(PageAddr); + MiUnmapPagesInZeroSpace(PageAddr); return Status; } } @@ -741,7 +741,7 @@ } } CcRosReleaseCacheSegment(Bcb, CacheSeg, TRUE, FALSE, FALSE); - MmDeleteHyperspaceMapping(PageAddr); + MiUnmapPagesInZeroSpace(PageAddr); } return(STATUS_SUCCESS); }