[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(
IN PEPROCESS Process,
IN PVOID BaseAddress,
IN ULONG Flags
IN BOOLEAN SkipDebuggerNotify
);
VOID

View File

@ -834,7 +834,7 @@ MiUnmapViewOfSection(IN PEPROCESS Process,
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 */

View File

@ -545,7 +545,7 @@ MiRosCleanupMemoryArea(
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)
{

View File

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