From 64c52012dfa4fa6c255e66863bcd86c6ceeb6a72 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 13 Nov 2024 17:26:42 +0200 Subject: [PATCH] Kernel: Fix MemoryRegion overlap comparison This made some calls to `munmap` unmap extra regions. --- kernel/kernel/Memory/MemoryRegion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kernel/Memory/MemoryRegion.cpp b/kernel/kernel/Memory/MemoryRegion.cpp index 82376021..cb306d88 100644 --- a/kernel/kernel/Memory/MemoryRegion.cpp +++ b/kernel/kernel/Memory/MemoryRegion.cpp @@ -40,7 +40,7 @@ namespace Kernel bool MemoryRegion::overlaps(vaddr_t address, size_t size) const { - if (address + size < m_vaddr) + if (address + size <= m_vaddr) return false; if (address >= m_vaddr + m_size) return false;