From f18a176b601c8dc15b372607a4e9f289bdc25ee4 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 7 Aug 2017 13:37:16 -0500 Subject: Kernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping. --- src/core/memory.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/memory.cpp') diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 4dcbf2274..4d16736f5 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -208,8 +208,7 @@ bool IsValidVirtualAddress(const VAddr vaddr) { } bool IsValidPhysicalAddress(const PAddr paddr) { - boost::optional vaddr = PhysicalToVirtualAddress(paddr); - return vaddr && IsValidVirtualAddress(*vaddr); + return GetPhysicalPointer(paddr) != nullptr; } u8* GetPointer(const VAddr vaddr) { -- cgit v1.2.3