[ros-diffs] [cgutman] 56051: [NEWCC] - Check that the memory area is not being deleted before using it
cgutman at svn.reactos.org
cgutman at svn.reactos.org
Mon Mar 5 19:48:24 UTC 2012
Author: cgutman
Date: Mon Mar 5 19:48:24 2012
New Revision: 56051
URL: http://svn.reactos.org/svn/reactos?rev=56051&view=rev
Log:
[NEWCC]
- Check that the memory area is not being deleted before using it
Modified:
trunk/reactos/ntoskrnl/cache/section/data.c
Modified: trunk/reactos/ntoskrnl/cache/section/data.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/data.c?rev=56051&r1=56050&r2=56051&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] Mon Mar 5 19:48:24 2012
@@ -113,7 +113,7 @@
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 @@
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 @@
PMM_SECTION_SEGMENT Segment;
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
- if (MemoryArea == NULL)
+ if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
{
ASSERT(MemoryArea);
return(STATUS_UNSUCCESSFUL);
More information about the Ros-diffs
mailing list