Don't acquire the pfn lock before calling MmReleasePageMemoryConsumer. The function acquires it already and before that it acquires a different spinlock, leading to a race condition on SMP systems.

svn path=/branches/ros-amd64-bringup/; revision=44269
This commit is contained in:
Timo Kreuzer
2009-11-22 20:33:49 +00:00
parent a504eda297
commit aae3e9fba5
-10
View File
@@ -320,11 +320,6 @@ MiFreeContiguousMemory(IN PVOID BaseAddress)
//
MmUnmapIoSpace(BaseAddress, PageCount << PAGE_SHIFT);
//
// Lock the PFN database
//
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
//
// Loop all the pages
//
@@ -336,11 +331,6 @@ MiFreeContiguousMemory(IN PVOID BaseAddress)
//
MmReleasePageMemoryConsumer(MC_NPPOOL, PageFrameIndex);
} while (++PageFrameIndex < LastPage);
//
// Release the PFN lock
//
KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
}
/* PUBLIC FUNCTIONS ***********************************************************/