https://git.reactos.org/?p=reactos.git;a=commitdiff;h=093333740468ad0af68280...
commit 093333740468ad0af68280d53c928ed4bacfeea1 Author: Jérôme Gardou jerome.gardou@reactos.org AuthorDate: Wed Nov 18 17:45:47 2020 +0100 Commit: Jérôme Gardou jerome.gardou@reactos.org CommitDate: Wed Feb 3 09:41:22 2021 +0100
[NTOS/MM] Do not dirtify section pages for system-space maps
Cc does it for itself. --- ntoskrnl/mm/section.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c index 46bf5cb571d..f108533ed2e 100644 --- a/ntoskrnl/mm/section.c +++ b/ntoskrnl/mm/section.c @@ -3343,8 +3343,12 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, else { if (Process) + { MmDeleteRmap(Page, Process, Address); - MmUnsharePageEntrySectionSegment(MemoryArea, Segment, &Offset, Dirty, FALSE, NULL); + } + + /* We don't dirtify for System Space Maps. We let Cc manage that */ + MmUnsharePageEntrySectionSegment(MemoryArea, Segment, &Offset, Process ? Dirty : FALSE, FALSE, NULL); } } }