From 3e066d380da4d787a33e687682e4923441ed2fa1 Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 7 Jan 2022 15:33:00 +0200 Subject: [PATCH] Kernel/Memory: Remove needless VERIFY in /dev/mem mmap validation method As it was pointed by Idan Horowitz, the rest of the method doesn't assume we have any reserved ranges to allow mmap(2) to work on them, so the VERIFY is not needed at all. --- Kernel/Memory/MemoryManager.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp index 389d91ee2c..eacaf4cc20 100644 --- a/Kernel/Memory/MemoryManager.cpp +++ b/Kernel/Memory/MemoryManager.cpp @@ -211,7 +211,6 @@ UNMAP_AFTER_INIT void MemoryManager::register_reserved_ranges() bool MemoryManager::is_allowed_to_mmap_to_userspace(PhysicalAddress start_address, VirtualRange const& range) const { - VERIFY(!m_reserved_memory_ranges.is_empty()); // Note: Guard against overflow in case someone tries to mmap on the edge of // the RAM if (start_address.offset_addition_would_overflow(range.size()))