Kernel: Fix logic error in PhysicalRegion::contains()

This was incorrectly returning true for the address one byte past the
end of the region.
This commit is contained in:
Andreas Kling 2021-07-14 00:13:18 +02:00
parent 6cc1247395
commit 5c24d18923
Notes: sideshowbarker 2024-07-18 09:06:16 +09:00

View File

@ -30,7 +30,7 @@ public:
PhysicalAddress lower() const { return m_lower; }
PhysicalAddress upper() const { return m_upper; }
unsigned size() const { return m_pages; }
bool contains(PhysicalAddress paddr) const { return paddr >= m_lower && paddr <= m_upper; }
bool contains(PhysicalAddress paddr) const { return paddr >= m_lower && paddr < m_upper; }
OwnPtr<PhysicalRegion> try_take_pages_from_beginning(unsigned);