diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c index 8acc368a884..a3efe4f0b6b 100644 --- a/ntoskrnl/mm/section.c +++ b/ntoskrnl/mm/section.c @@ -1020,6 +1020,7 @@ MmSharePageEntrySectionSegment(PMM_SECTION_SEGMENT Segment, PLARGE_INTEGER Offset) { ULONG_PTR Entry; + BOOLEAN Dirty; Entry = MmGetPageEntrySectionSegment(Segment, Offset); if (Entry == 0) @@ -1036,7 +1037,10 @@ MmSharePageEntrySectionSegment(PMM_SECTION_SEGMENT Segment, { KeBugCheck(MEMORY_MANAGEMENT); } + Dirty = IS_DIRTY_SSE(Entry); Entry = MAKE_SSE(PAGE_FROM_SSE(Entry), SHARE_COUNT_FROM_SSE(Entry) + 1); + if (Dirty) + Entry = DIRTY_SSE(Entry); MmSetPageEntrySectionSegment(Segment, Offset, Entry); }