Skip to content

Commit 51b75b5

Browse files
joergroedelKAGA-KOKO
authored andcommitted
x86/mm: Check for pfn instead of page in vmalloc_sync_one()
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: 5d72b4f ('x86, mm: support huge I/O mapping capability I/F') Signed-off-by: Joerg Roedel <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Dave Hansen <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 5f9e832 commit 51b75b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/mm/fault.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
183183
if (!pmd_present(*pmd))
184184
set_pmd(pmd, *pmd_k);
185185
else
186-
BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k));
186+
BUG_ON(pmd_pfn(*pmd) != pmd_pfn(*pmd_k));
187187

188188
return pmd_k;
189189
}

0 commit comments

Comments
 (0)