Author: cgutman
Date: Mon Dec 26 02:52:26 2011
New Revision: 54761
URL:
http://svn.reactos.org/svn/reactos?rev=54761&view=rev
Log:
[NTOSKRNL]
- Don't change page protection while the memory area is being deleted
Modified:
trunk/reactos/ntoskrnl/mm/anonmem.c
trunk/reactos/ntoskrnl/mm/marea.c
trunk/reactos/ntoskrnl/mm/pageop.c
Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/anonmem.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] Mon Dec 26 02:52:26 2011
@@ -495,7 +495,7 @@
MmLockAddressSpace(AddressSpace);
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, *BaseAddress);
- if (MemoryArea == NULL)
+ if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
{
MmUnlockAddressSpace(AddressSpace);
return STATUS_UNSUCCESSFUL;
Modified: trunk/reactos/ntoskrnl/mm/marea.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=54…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Mon Dec 26 02:52:26 2011
@@ -781,6 +781,9 @@
}
}
+ /* There must be no page ops in progress */
+ ASSERT(MemoryArea->PageOpCount == 0);
+
/* Remove the tree item. */
{
if (MemoryArea->Parent != NULL)
Modified: trunk/reactos/ntoskrnl/mm/pageop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pageop.c?rev=5…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/pageop.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/pageop.c [iso-8859-1] Mon Dec 26 02:52:26 2011
@@ -148,6 +148,9 @@
Address = (PVOID)PAGE_ROUND_DOWN(Address);
Offset = PAGE_ROUND_DOWN(Offset);
+
+ /* Making a page op during marea destruction is illegal */
+ ASSERT(!MArea->DeleteInProgress);
/*
* Calcuate the hash value for pageop structure