Do not crash the kernel when accessing a guard page.

svn path=/trunk/; revision=39465
This commit is contained in:
Dmitry Gorbachev 2009-02-07 19:29:39 +00:00
parent 0a8c6e11ea
commit dc0a2cec45

View file

@ -287,11 +287,20 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
Region = MmFindRegion(MemoryArea->StartingAddress,
&MemoryArea->Data.VirtualMemoryData.RegionListHead,
Address, NULL);
if (Region->Type == MEM_RESERVE || Region->Protect == PAGE_NOACCESS)
{
return(STATUS_ACCESS_VIOLATION);
}
/*
* FIXME
*/
if (Region->Protect & PAGE_GUARD)
{
return(STATUS_GUARD_PAGE_VIOLATION);
}
/*
* Get or create a page operation
*/