mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTOS:Mm] Handle RosMm pages in MiDecrementReferenceCount
This is required, when RosMm unmaps locked pages and they later get unlocked.
This commit is contained in:
parent
80dd9f5a90
commit
5f014e421b
1 changed files with 11 additions and 0 deletions
|
@ -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) ||
|
||||
|
|
Loading…
Reference in a new issue