https://git.reactos.org/?p=reactos.git;a=commitdiff;h=de3958dc2b626626d017be102c04eb75b3cce56d

commit de3958dc2b626626d017be102c04eb75b3cce56d
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Tue Oct 10 02:42:11 2023 +0300
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Tue Oct 24 21:45:27 2023 +0300

    Revert "[NTOS:MM/x64] Temporarily release AddressCreationLock in 
MmCreateVirtualMappingUnsafeEx"
    
    This reverts commit e685b25e35c9d6dfbe2139ac71f7378b1f9e6d0f.
---
 ntoskrnl/mm/i386/page.c | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/ntoskrnl/mm/i386/page.c b/ntoskrnl/mm/i386/page.c
index eeccef94346..df13cb013e2 100644
--- a/ntoskrnl/mm/i386/page.c
+++ b/ntoskrnl/mm/i386/page.c
@@ -637,9 +637,6 @@ MmCreateVirtualMappingUnsafeEx(
     PMMPTE PointerPte;
     MMPTE TempPte;
     ULONG_PTR Pte;
-#ifdef _M_AMD64
-    BOOLEAN LockReleased = FALSE;
-#endif
 
     DPRINT("MmCreateVirtualMappingUnsafe(%p, %p, %lu, %x)\n",
            Process, Address, flProtect, Page);
@@ -668,15 +665,6 @@ MmCreateVirtualMappingUnsafeEx(
         if (!MiSynchronizeSystemPde(MiAddressToPde(Address)))
             MiFillSystemPageDirectory(Address, PAGE_SIZE);
 #endif
-
-#ifdef _M_AMD64
-        /* This is a temporary hack, because we can incur a recursive page 
fault when accessing the PDE */
-        if (PsIdleProcess->AddressCreationLock.Owner == KeGetCurrentThread())
-        {
-            MmUnlockAddressSpace(MmGetKernelAddressSpace());
-            LockReleased = TRUE;
-        }
-#endif
     }
     else
     {
@@ -727,15 +715,6 @@ MmCreateVirtualMappingUnsafeEx(
         MiIncrementPageTableReferences(Address);
         MiUnlockProcessWorkingSetUnsafe(Process, PsGetCurrentThread());
     }
-#ifdef _M_AMD64
-    else
-    {
-        if (LockReleased)
-        {
-            MmLockAddressSpace(MmGetKernelAddressSpace());
-        }
-    }
-#endif
 
     return(STATUS_SUCCESS);
 }

Reply via email to