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
//
MmUnmapIoSpace(BaseAddress, PageCount << PAGE_SHIFT);
- //
- // Lock the PFN database
- //
- OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
-
//
// Loop all the pages
//
//
MmReleasePageMemoryConsumer(MC_NPPOOL, PageFrameIndex);
} while (++PageFrameIndex < LastPage);
-
- //
- // Release the PFN lock
- //
- KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
}
/* PUBLIC FUNCTIONS ***********************************************************/