[NTOS:MM] Make the situation about dirty pages in image map a bit clearer

This commit is contained in:
Jérôme Gardou 2020-12-07 09:55:12 +01:00
parent cd23d6e19a
commit fb07802956

View file

@ -1082,7 +1082,7 @@ MmUnsharePageEntrySectionSegment(PMEMORY_AREA MemoryArea,
return FALSE;
}
if (IS_DIRTY_SSE(Entry) && !(Segment->Image.Characteristics & IMAGE_SCN_MEM_SHARED))
if (Dirty && (MemoryArea->VadNode.u.VadFlags.VadType != VadImageMap))
{
ASSERT(!Segment->WriteCopy);
ASSERT(MmGetSavedSwapEntryPage(Page) == 0);
@ -1092,6 +1092,9 @@ MmUnsharePageEntrySectionSegment(PMEMORY_AREA MemoryArea,
return FALSE;
}
/* Only valid case for shared dirty pages is shared image section */
ASSERT(!Dirty || (Segment->Image.Characteristics & IMAGE_SCN_MEM_SHARED));
SwapEntry = MmGetSavedSwapEntryPage(Page);
if (Dirty && !SwapEntry)
{