Fix check for PTE removal flag
This commit is contained in:
@@ -818,7 +818,7 @@ MM::Allocator::FreeNonPagedPoolPages(IN PVOID VirtualAddress,
|
|||||||
PageFrameNumber = MM::Paging::GetPageFrameNumber(PointerPte);
|
PageFrameNumber = MM::Paging::GetPageFrameNumber(PointerPte);
|
||||||
Pfn = MM::Pfn::GetPfnEntry(PageFrameNumber);
|
Pfn = MM::Pfn::GetPfnEntry(PageFrameNumber);
|
||||||
|
|
||||||
/* Clear PFN shared count and mark the PFN as deleted */
|
/* Clear PFN shared count and mark the PFN as ready for removal */
|
||||||
Pfn->u2.ShareCount = 0;
|
Pfn->u2.ShareCount = 0;
|
||||||
Pfn->PteAddress = (PMMPTE)((ULONG_PTR)Pfn->PteAddress | 0x1);
|
Pfn->PteAddress = (PMMPTE)((ULONG_PTR)Pfn->PteAddress | 0x1);
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ MM::Pfn::DecrementReferenceCount(IN PMMPFN PageFrameNumber,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check if the PTE is marked as being ready for removal */
|
/* Check if the PTE is marked as being ready for removal */
|
||||||
if(MM::Paging::GetPte(PageFrameNumber->PteAddress) & 0x1)
|
if((ULONG_PTR)PageFrameNumber->PteAddress & 0x1)
|
||||||
{
|
{
|
||||||
/* Check the page's cache attribute */
|
/* Check the page's cache attribute */
|
||||||
if((PageFrameNumber->u3.e1.CacheAttribute != PfnCached) &&
|
if((PageFrameNumber->u3.e1.CacheAttribute != PfnCached) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user