Author: cgutman
Date: Mon Mar 5 19:54:00 2012
New Revision: 56052
URL:
http://svn.reactos.org/svn/reactos?rev=56052&view=rev
Log:
[NTOSKRNL]
- Assert that the PFN lock is held during MmReferencePage
- Assert that the PFN lock is not held during MmFreeMemoryArea
Modified:
trunk/reactos/ntoskrnl/mm/freelist.c
trunk/reactos/ntoskrnl/mm/marea.c
Modified: trunk/reactos/ntoskrnl/mm/freelist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Mon Mar 5 19:54:00 2012
@@ -493,10 +493,9 @@
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);
Modified: trunk/reactos/ntoskrnl/mm/marea.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=56…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Mon Mar 5 19:54:00 2012
@@ -747,6 +747,7 @@
}
#if (_MI_PAGING_LEVELS == 2)
/* Remove page table reference */
+ ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
if((SwapEntry || Page) && ((PVOID)Address < MmSystemRangeStart))
{
ASSERT(AddressSpace != MmGetKernelAddressSpace());