- Call MmDeletePageFileMapping with the process in MmNotPresentFaultVirtualMemory.

This is necessary for dereferencing the user mode page table.

svn path=/trunk/; revision=6824
This commit is contained in:
Hartmut Birr 2003-11-30 17:24:22 +00:00
parent 36e302cc70
commit ee52d15ec0

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: anonmem.c,v 1.21 2003/08/29 21:23:06 dwelch Exp $ /* $Id: anonmem.c,v 1.22 2003/11/30 17:24:22 hbirr Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/anonmem.c * FILE: ntoskrnl/mm/anonmem.c
@ -374,7 +374,7 @@ MmNotPresentFaultVirtualMemory(PMADDRESS_SPACE AddressSpace,
SWAPENTRY SwapEntry; SWAPENTRY SwapEntry;
PMDL Mdl; PMDL Mdl;
MmDeletePageFileMapping(NULL, Address, &SwapEntry); MmDeletePageFileMapping(MemoryArea->Process, Address, &SwapEntry);
Mdl = MmCreateMdl(NULL, NULL, PAGE_SIZE); Mdl = MmCreateMdl(NULL, NULL, PAGE_SIZE);
MmBuildMdlFromPages(Mdl, (PULONG)&Page); MmBuildMdlFromPages(Mdl, (PULONG)&Page);
Status = MmReadFromSwapPage(SwapEntry, Mdl); Status = MmReadFromSwapPage(SwapEntry, Mdl);
@ -465,10 +465,9 @@ MmModifyAttributes(PMADDRESS_SPACE AddressSpace,
} }
else else
{ {
PhysicalAddr = MmGetPhysicalAddress(BaseAddress + (i*PAGE_SIZE));
MmDeleteVirtualMapping(AddressSpace->Process, MmDeleteVirtualMapping(AddressSpace->Process,
BaseAddress + (i*PAGE_SIZE), BaseAddress + (i*PAGE_SIZE),
FALSE, NULL, NULL); FALSE, NULL, &PhysicalAddr);
if (PhysicalAddr.QuadPart != 0) if (PhysicalAddr.QuadPart != 0)
{ {
SWAPENTRY SavedSwapEntry; SWAPENTRY SavedSwapEntry;