[NTOS:CC] Make sure to purge the Mm side in CcPurgeCacheSection

This commit is contained in:
Jérôme Gardou 2021-01-27 16:19:07 +01:00
parent d0bf98663b
commit cc6bc02b91

View file

@ -180,7 +180,10 @@ CcPurgeCacheSection (
SharedCacheMap = SectionObjectPointer->SharedCacheMap;
if (!SharedCacheMap)
return FALSE;
{
Success = TRUE;
goto purgeMm;
}
StartOffset = FileOffset != NULL ? FileOffset->QuadPart : 0;
if (Length == 0 || FileOffset == NULL)
@ -257,6 +260,11 @@ CcPurgeCacheSection (
ASSERT(Refs == 0);
}
/* Now make sure that Mm doesn't hold some pages here. */
purgeMm:
if (Success)
Success = MmPurgeSegment(SectionObjectPointer, FileOffset, Length);
return Success;
}