Author: mjansen
Date: Thu Jun 8 20:34:47 2017
New Revision: 74969
URL:
http://svn.reactos.org/svn/reactos?rev=74969&view=rev
Log:
[NTOS:MM] Do not queue debugger events after notifying process exit. CORE-13393
Patch suggested by Thomas.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
trunk/reactos/ntoskrnl/mm/ARM3/section.c
trunk/reactos/ntoskrnl/mm/marea.c
trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Thu Jun 8 20:34:47 2017
@@ -2104,7 +2104,7 @@
MiRosUnmapViewOfSection(
IN PEPROCESS Process,
IN PVOID BaseAddress,
- IN ULONG Flags
+ IN BOOLEAN SkipDebuggerNotify
);
VOID
Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Thu Jun 8 20:34:47 2017
@@ -834,7 +834,7 @@
if ((MemoryArea) && (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3))
{
/* Call Mm API */
- return MiRosUnmapViewOfSection(Process, BaseAddress, Flags);
+ return MiRosUnmapViewOfSection(Process, BaseAddress,
Process->ProcessExiting);
}
/* Check if we should attach to the process */
Modified: trunk/reactos/ntoskrnl/mm/marea.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=74…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Thu Jun 8 20:34:47 2017
@@ -545,7 +545,7 @@
if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW)
{
- Status = MiRosUnmapViewOfSection(Process, BaseAddress, 0);
+ Status = MiRosUnmapViewOfSection(Process, BaseAddress,
Process->ProcessExiting);
}
else if (MemoryArea->Type == MEMORY_AREA_CACHE)
{
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Thu Jun 8 20:34:47 2017
@@ -4142,7 +4142,7 @@
NTAPI
MiRosUnmapViewOfSection(IN PEPROCESS Process,
IN PVOID BaseAddress,
- IN ULONG Flags)
+ IN BOOLEAN SkipDebuggerNotify)
{
NTSTATUS Status;
PMEMORY_AREA MemoryArea;
@@ -4230,7 +4230,7 @@
MmUnlockAddressSpace(AddressSpace);
/* Notify debugger */
- if (ImageBaseAddress) DbgkUnMapViewOfSection(ImageBaseAddress);
+ if (ImageBaseAddress && !SkipDebuggerNotify)
DbgkUnMapViewOfSection(ImageBaseAddress);
return(STATUS_SUCCESS);
}