diff options
-rw-r--r-- | Kernel/Memory/MemoryManager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp index 07eb097970..d76a802ed0 100644 --- a/Kernel/Memory/MemoryManager.cpp +++ b/Kernel/Memory/MemoryManager.cpp @@ -645,6 +645,9 @@ UNMAP_AFTER_INIT void MemoryManager::initialize(u32 cpu) Region* MemoryManager::kernel_region_from_vaddr(VirtualAddress vaddr) { + if (is_user_address(vaddr)) + return nullptr; + SpinlockLocker lock(s_mm_lock); auto* region = MM.m_kernel_regions.find_largest_not_above(vaddr.get()); if (!region || !region->contains(vaddr)) |