diff options
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Memory/MemoryManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp index 81f5da7c1d..bf9acc51fd 100644 --- a/Kernel/Memory/MemoryManager.cpp +++ b/Kernel/Memory/MemoryManager.cpp @@ -623,7 +623,7 @@ Region* MemoryManager::kernel_region_from_vaddr(VirtualAddress vaddr) auto* region_ptr = MM.m_kernel_regions.find_largest_not_above(vaddr.get()); if (!region_ptr) return nullptr; - return *region_ptr; + return (*region_ptr)->contains(vaddr) ? *region_ptr : nullptr; } Region* MemoryManager::find_user_region_from_vaddr_no_lock(AddressSpace& space, VirtualAddress vaddr) |