[ros-diffs] [pschweitzer] 37166: Fast mutex are allocated with non paged memory. Spotted by Alex

pschweitzer at svn.reactos.org pschweitzer at svn.reactos.org
Mon Nov 3 13:25:11 CET 2008


Author: pschweitzer
Date: Mon Nov  3 06:25:10 2008
New Revision: 37166

URL: http://svn.reactos.org/svn/reactos?rev=37166&view=rev
Log:
Fast mutex are allocated with non paged memory.
Spotted by Alex

Modified:
    branches/pierre-fsd/ntoskrnl/fsrtl/largemcb.c

Modified: branches/pierre-fsd/ntoskrnl/fsrtl/largemcb.c
URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/fsrtl/largemcb.c?rev=37166&r1=37165&r2=37166&view=diff
==============================================================================
--- branches/pierre-fsd/ntoskrnl/fsrtl/largemcb.c [iso-8859-1] (original)
+++ branches/pierre-fsd/ntoskrnl/fsrtl/largemcb.c [iso-8859-1] Mon Nov  3 06:25:10 2008
@@ -16,7 +16,7 @@
 /* GLOBALS *******************************************************************/
 
 PAGED_LOOKASIDE_LIST FsRtlFirstMappingLookasideList;
-PAGED_LOOKASIDE_LIST FsRtlFastMutexLookasideList;
+NPAGED_LOOKASIDE_LIST FsRtlFastMutexLookasideList;
 
 /* PUBLIC FUNCTIONS **********************************************************/
 
@@ -129,7 +129,7 @@
 FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb,
                         IN POOL_TYPE PoolType)
 {
-    Mcb->FastMutex = ExAllocateFromPagedLookasideList(&FsRtlFastMutexLookasideList);
+    Mcb->FastMutex = ExAllocateFromNPagedLookasideList(&FsRtlFastMutexLookasideList);
     ExInitializeFastMutex(Mcb->FastMutex);
 
     FsRtlInitializeBaseMcb(&(Mcb->BaseMcb), PoolType);
@@ -152,13 +152,13 @@
                                    0); /* FIXME: Should be 4 */
 
     /* Initialize the list for the fast mutex */
-    ExInitializePagedLookasideList(&FsRtlFastMutexLookasideList,
-                                   NULL,
-                                   NULL,
-                                   POOL_RAISE_IF_ALLOCATION_FAILURE,
-                                   sizeof(FAST_MUTEX),
-                                   IFS_POOL_TAG,
-                                   0); /* FIXME: Should be 32 */
+    ExInitializeNPagedLookasideList(&FsRtlFastMutexLookasideList,
+                                    NULL,
+                                    NULL,
+                                    POOL_RAISE_IF_ALLOCATION_FAILURE,
+                                    sizeof(FAST_MUTEX),
+                                    IFS_POOL_TAG,
+                                    0); /* FIXME: Should be 32 */
 }
 
 /*
@@ -453,8 +453,8 @@
 {
     if (Mcb->FastMutex)
     {
-        ExFreeToPagedLookasideList(&FsRtlFastMutexLookasideList,
-                                   Mcb->FastMutex);
+        ExFreeToNPagedLookasideList(&FsRtlFastMutexLookasideList,
+                                    Mcb->FastMutex);
         FsRtlUninitializeBaseMcb(&(Mcb->BaseMcb));
     }
 }



More information about the Ros-diffs mailing list