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.
This commit is contained in:
Liav A 2022-01-07 15:33:00 +02:00 committed by Idan Horowitz
parent 10ec98dd38
commit 3e066d380d
Notes: sideshowbarker 2024-07-17 21:29:30 +09:00

View file

@ -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()))