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

commit 84d0586ca40c21ae4d2b3a68137bc3e88423d463
Author:     Timo Kreuzer <timo.kreu...@reactos.org>
AuthorDate: Tue Oct 10 22:37:21 2023 +0300
Commit:     Timo Kreuzer <timo.kreu...@reactos.org>
CommitDate: Tue Oct 24 21:45:27 2023 +0300

    [NTOS:MM] Handle page table faults in MmArmAccessFault
    
    These faults are handled by ARM³ and we don't need to check for a memory 
area. They can be recursive faults (e.g. from MiDeleteSystemPageableVm), so we 
might be holding the WS lock already. Passing it straight to ARM³ allows to 
acquire the WS lock below to look up the memory area.
---
 ntoskrnl/mm/mmfault.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ntoskrnl/mm/mmfault.c b/ntoskrnl/mm/mmfault.c
index 7937f7b5e5b..68e31ba1281 100644
--- a/ntoskrnl/mm/mmfault.c
+++ b/ntoskrnl/mm/mmfault.c
@@ -227,11 +227,12 @@ MmAccessFault(IN ULONG FaultCode,
 #endif
     }
 
-    /* Handle shared user page, which doesn't have a VAD / MemoryArea */
-    if (PAGE_ALIGN(Address) == (PVOID)MM_SHARED_USER_DATA_VA)
+    /* Handle shared user page / page table, which don't have a VAD / 
MemoryArea */
+    if ((PAGE_ALIGN(Address) == (PVOID)MM_SHARED_USER_DATA_VA) ||
+        MI_IS_PAGE_TABLE_ADDRESS(Address))
     {
         /* This is an ARM3 fault */
-        DPRINT("ARM3 fault %p\n", MemoryArea);
+        DPRINT("ARM3 fault %p\n", Address);
         return MmArmAccessFault(FaultCode, Address, Mode, TrapInformation);
     }
 

Reply via email to