Make the address space mutex unsafe, because sometimes it is acquired at > APC_LEVEL...
[reactos.git] / reactos / ntoskrnl / mm / aspace.c
index 281c1b4..b79d67b 100644 (file)
@@ -30,7 +30,7 @@ MmLockAddressSpace(PMADDRESS_SPACE AddressSpace)
    {
       return;
    }
-   ExAcquireFastMutex(&AddressSpace->Lock);
+   ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&AddressSpace->Lock);
 }
 
 VOID
@@ -44,7 +44,7 @@ MmUnlockAddressSpace(PMADDRESS_SPACE AddressSpace)
    {
       return;
    }
-   ExReleaseFastMutex(&AddressSpace->Lock);
+   ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&AddressSpace->Lock);
 }
 
 VOID