From cfb8d5658bc27fb24e069320ef07f90e1b4e1a34 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 5 Mar 2012 19:48:24 +0000 Subject: [PATCH] [NEWCC] - Check that the memory area is not being deleted before using it svn path=/trunk/; revision=56051 --- reactos/ntoskrnl/cache/section/data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/cache/section/data.c b/reactos/ntoskrnl/cache/section/data.c index 95b1effc739..486bb0e1e34 100644 --- a/reactos/ntoskrnl/cache/section/data.c +++ b/reactos/ntoskrnl/cache/section/data.c @@ -113,7 +113,7 @@ MiZeroFillSection MmLockAddressSpace(AddressSpace); MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, Address); MmUnlockAddressSpace(AddressSpace); - if (!MemoryArea || MemoryArea->Type != MEMORY_AREA_SECTION_VIEW) + if (!MemoryArea || MemoryArea->Type != MEMORY_AREA_SECTION_VIEW || MemoryArea->DeleteInProgress) { return STATUS_NOT_MAPPED_DATA; } @@ -188,7 +188,7 @@ _MiFlushMappedSection MmLockAddressSpace(AddressSpace); MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress); - if (!MemoryArea || MemoryArea->Type != MEMORY_AREA_CACHE) + if (!MemoryArea || MemoryArea->Type != MEMORY_AREA_CACHE || MemoryArea->DeleteInProgress) { MmUnlockAddressSpace(AddressSpace); DPRINT("STATUS_NOT_MAPPED_DATA\n"); @@ -698,7 +698,7 @@ MmUnmapViewOfCacheSegment PMM_SECTION_SEGMENT Segment; MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress); - if (MemoryArea == NULL) + if (MemoryArea == NULL || MemoryArea->DeleteInProgress) { ASSERT(MemoryArea); return(STATUS_UNSUCCESSFUL);