From aae3e9fba500b38dd2f3768b07ad38f65f20318e Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 22 Nov 2009 20:33:49 +0000 Subject: [PATCH] [MM] 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 --- reactos/ntoskrnl/mm/ARM3/contmem.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/reactos/ntoskrnl/mm/ARM3/contmem.c b/reactos/ntoskrnl/mm/ARM3/contmem.c index 7c11c574a89..601ae92b12c 100644 --- a/reactos/ntoskrnl/mm/ARM3/contmem.c +++ b/reactos/ntoskrnl/mm/ARM3/contmem.c @@ -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 ***********************************************************/