[NTOSKRNL]

- Assert that the PFN lock is held during MmReferencePage
- Assert that the PFN lock is not held during MmFreeMemoryArea

svn path=/trunk/; revision=56052
This commit is contained in:
Cameron Gutman 2012-03-05 19:54:00 +00:00
parent cfb8d5658b
commit 0c5896f63f
2 changed files with 4 additions and 4 deletions

View file

@ -493,10 +493,9 @@ MmReferencePage(PFN_NUMBER Pfn)
DPRINT("MmReferencePage(PysicalAddress %x)\n", Pfn << PAGE_SHIFT);
if (Pfn == 0 || Pfn > MmHighestPhysicalPage)
{
return;
}
ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
ASSERT(Pfn != 0);
ASSERT(Pfn <= MmHighestPhysicalPage);
Page = MiGetPfnEntry(Pfn);
ASSERT(Page);

View file

@ -747,6 +747,7 @@ MmFreeMemoryArea(
}
#if (_MI_PAGING_LEVELS == 2)
/* Remove page table reference */
ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
if((SwapEntry || Page) && ((PVOID)Address < MmSystemRangeStart))
{
ASSERT(AddressSpace != MmGetKernelAddressSpace());