summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/fault.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2019-07-19 20:46:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-25 10:52:43 +0200
commitdc2b262c02bb73ea7655d7ea389dd9f181b43a02 (patch)
tree0a7f30e4d9e0f31afd2d9a793275fdd59d8d7cd3 /arch/x86/mm/fault.c
parent72db67d5adfedb94b14ab455d3be20dae9416665 (diff)
downloadlinux-stable-dc2b262c02bb73ea7655d7ea389dd9f181b43a02.tar.gz
linux-stable-dc2b262c02bb73ea7655d7ea389dd9f181b43a02.tar.bz2
linux-stable-dc2b262c02bb73ea7655d7ea389dd9f181b43a02.zip
x86/mm: Check for pfn instead of page in vmalloc_sync_one()
commit 51b75b5b563a2637f9d8dc5bd02a31b2ff9e5ea0 upstream. Do not require a struct page for the mapped memory location because it might not exist. This can happen when an ioremapped region is mapped with 2MB pages. Fixes: 5d72b4fba40ef ('x86, mm: support huge I/O mapping capability I/F') Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lkml.kernel.org/r/20190719184652.11391-2-joro@8bytes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r--arch/x86/mm/fault.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 462c5c30b9a2..f3511f1a8f0e 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -222,7 +222,7 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
if (!pmd_present(*pmd))
set_pmd(pmd, *pmd_k);
else
- BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k));
+ BUG_ON(pmd_pfn(*pmd) != pmd_pfn(*pmd_k));
return pmd_k;
}