https://git.reactos.org/?p=reactos.git;a=commitdiff;h=23589e9bf14afe5763a1fe...
commit 23589e9bf14afe5763a1fede921b1f67ef949246 Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Tue Oct 10 02:33:53 2023 +0300 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Tue Oct 24 21:45:27 2023 +0300
[NTOS:MM] Lock kernel address space in MiInitSystemMemoryAreas
This is required to satisfy VAD locking rules. --- ntoskrnl/mm/mminit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/mm/mminit.c b/ntoskrnl/mm/mminit.c index 3e58ad9bbc8..009383992b7 100644 --- a/ntoskrnl/mm/mminit.c +++ b/ntoskrnl/mm/mminit.c @@ -1,4 +1,4 @@ -/* +/* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory * FILE: ntoskrnl/mm/mminit.c @@ -68,6 +68,8 @@ MiInitSystemMemoryAreas(VOID) // Create all the static memory areas. //
+ MmLockAddressSpace(MmGetKernelAddressSpace()); + #ifdef _M_AMD64 // Reserved range FFFF800000000000 - FFFFF68000000000 MiCreateArm3StaticMemoryArea((PVOID)MI_REAL_SYSTEM_RANGE_START, PTE_BASE - MI_REAL_SYSTEM_RANGE_START, FALSE); @@ -118,6 +120,8 @@ MiInitSystemMemoryAreas(VOID) // KUSER_SHARED_DATA MiCreateArm3StaticMemoryArea((PVOID)KI_USER_SHARED_DATA, PAGE_SIZE, FALSE); #endif /* _X86_ */ + + MmUnlockAddressSpace(MmGetKernelAddressSpace()); }
CODE_SEG("INIT")