1
0
Fork 0
mirror of https://github.com/reactos/reactos.git synced 2025-06-15 15:48:30 +00:00

[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
reactos/ntoskrnl/mm

View file

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

View file

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