[NTOS:MM] Do not queue debugger events after notifying process exit. CORE-13393

Patch suggested by Thomas.

svn path=/trunk/; revision=74969
This commit is contained in:
Mark Jansen 2017-06-08 20:34:47 +00:00
parent 8ad0eae687
commit 8d15eb4dea
4 changed files with 5 additions and 5 deletions

View file

@ -2104,7 +2104,7 @@ NTAPI
MiRosUnmapViewOfSection( MiRosUnmapViewOfSection(
IN PEPROCESS Process, IN PEPROCESS Process,
IN PVOID BaseAddress, IN PVOID BaseAddress,
IN ULONG Flags IN BOOLEAN SkipDebuggerNotify
); );
VOID VOID

View file

@ -834,7 +834,7 @@ MiUnmapViewOfSection(IN PEPROCESS Process,
if ((MemoryArea) && (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3)) if ((MemoryArea) && (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3))
{ {
/* Call Mm API */ /* Call Mm API */
return MiRosUnmapViewOfSection(Process, BaseAddress, Flags); return MiRosUnmapViewOfSection(Process, BaseAddress, Process->ProcessExiting);
} }
/* Check if we should attach to the process */ /* Check if we should attach to the process */

View file

@ -545,7 +545,7 @@ MiRosCleanupMemoryArea(
if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW) 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) else if (MemoryArea->Type == MEMORY_AREA_CACHE)
{ {

View file

@ -4142,7 +4142,7 @@ NTSTATUS
NTAPI NTAPI
MiRosUnmapViewOfSection(IN PEPROCESS Process, MiRosUnmapViewOfSection(IN PEPROCESS Process,
IN PVOID BaseAddress, IN PVOID BaseAddress,
IN ULONG Flags) IN BOOLEAN SkipDebuggerNotify)
{ {
NTSTATUS Status; NTSTATUS Status;
PMEMORY_AREA MemoryArea; PMEMORY_AREA MemoryArea;
@ -4230,7 +4230,7 @@ MiRosUnmapViewOfSection(IN PEPROCESS Process,
MmUnlockAddressSpace(AddressSpace); MmUnlockAddressSpace(AddressSpace);
/* Notify debugger */ /* Notify debugger */
if (ImageBaseAddress) DbgkUnMapViewOfSection(ImageBaseAddress); if (ImageBaseAddress && !SkipDebuggerNotify) DbgkUnMapViewOfSection(ImageBaseAddress);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }