diff --git a/ntoskrnl/mm/ARM3/pfnlist.c b/ntoskrnl/mm/ARM3/pfnlist.c index 5712f22557a..56654d1e113 100644 --- a/ntoskrnl/mm/ARM3/pfnlist.c +++ b/ntoskrnl/mm/ARM3/pfnlist.c @@ -1219,6 +1219,10 @@ MiDecrementShareCount(IN PMMPFN Pfn1, } } +VOID +NTAPI +MmDereferencePage(PFN_NUMBER Pfn); + VOID NTAPI MiDecrementReferenceCount(IN PMMPFN Pfn1, @@ -1227,6 +1231,13 @@ MiDecrementReferenceCount(IN PMMPFN Pfn1, /* PFN lock must be held */ MI_ASSERT_PFN_LOCK_HELD(); + /* Handle RosMm PFNs here, too (in case they got locked/unlocked by ARM3) */ + if (MI_IS_ROS_PFN(Pfn1)) + { + MmDereferencePage(PageFrameIndex); + return; + } + /* Sanity checks on the page */ if (PageFrameIndex > MmHighestPhysicalPage || Pfn1 != MI_PFN_ELEMENT(PageFrameIndex) ||