[ros-diffs] [cgutman] 54531: [NTOSKRNL] - Add missing user PFN bitmap locking in MmRemoveLRUUserPage

cgutman at svn.reactos.org cgutman at svn.reactos.org
Tue Nov 29 04:22:53 UTC 2011


Author: cgutman
Date: Tue Nov 29 04:22:51 2011
New Revision: 54531

URL: http://svn.reactos.org/svn/reactos?rev=54531&view=rev
Log:
[NTOSKRNL]
- Add missing user PFN bitmap locking in MmRemoveLRUUserPage

Modified:
    trunk/reactos/ntoskrnl/mm/freelist.c

Modified: trunk/reactos/ntoskrnl/mm/freelist.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev=54531&r1=54530&r2=54531&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Tue Nov 29 04:22:51 2011
@@ -121,11 +121,15 @@
 NTAPI
 MmRemoveLRUUserPage(PFN_NUMBER Page)
 {
+    KIRQL OldIrql;
+
     /* Unset the page as a user page */
     ASSERT(Page != 0);
     ASSERT_IS_ROS_PFN(MiGetPfnEntry(Page));
     ASSERT(RtlCheckBit(&MiUserPfnBitMap, (ULONG)Page));
+    OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
     RtlClearBit(&MiUserPfnBitMap, (ULONG)Page);
+    KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
 }
 
 BOOLEAN




More information about the Ros-diffs mailing list