aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/mm/mmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
index db3165714521..dc726e07d8ba 100644
--- a/arch/x86/mm/mmap.c
+++ b/arch/x86/mm/mmap.c
@@ -230,7 +230,7 @@ bool mmap_address_hint_valid(unsigned long addr, unsigned long len)
230/* Can we access it for direct reading/writing? Must be RAM: */ 230/* Can we access it for direct reading/writing? Must be RAM: */
231int valid_phys_addr_range(phys_addr_t addr, size_t count) 231int valid_phys_addr_range(phys_addr_t addr, size_t count)
232{ 232{
233 return addr + count <= __pa(high_memory); 233 return addr + count - 1 <= __pa(high_memory - 1);
234} 234}
235 235
236/* Can we access it through mmap? Must be a valid physical address: */ 236/* Can we access it through mmap? Must be a valid physical address: */