diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-10-27 18:40:47 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-27 18:40:47 +0100 |
commit | 06ef431ab8060aa8ef51b36f56773d01f6a53f24 (patch) | |
tree | 4ca74ea5ffec670d3e455219c66929c6be398079 /arch/x86/mm/pageattr.c | |
parent | 790a2ee2427852cff50993c98f15ed88511e9af0 (diff) | |
parent | 2c66e24d75d424919c42288b418d2e593fa818b1 (diff) | |
download | op-kernel-dev-06ef431ab8060aa8ef51b36f56773d01f6a53f24.zip op-kernel-dev-06ef431ab8060aa8ef51b36f56773d01f6a53f24.tar.gz |
Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into core/efi
Pull EFI fix from Matt Fleming:
- Fix a kernel panic by not passing EFI virtual mapping addresses to
__pa() in the x86 pageattr code. Since these virtual addreses are
not part of the direct mapping or kernel text mapping, passing them
to __pa() will trigger a BUG_ON() when CONFIG_DEBUG_VIRTUAL is
enabled. (Sai Praneeth Prakhya)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r-- | arch/x86/mm/pageattr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 2c44c07..050a092 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -647,9 +647,12 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address, for (i = 0; i < PTRS_PER_PTE; i++, pfn += pfninc) set_pte(&pbase[i], pfn_pte(pfn, canon_pgprot(ref_prot))); - if (pfn_range_is_mapped(PFN_DOWN(__pa(address)), - PFN_DOWN(__pa(address)) + 1)) - split_page_count(level); + if (virt_addr_valid(address)) { + unsigned long pfn = PFN_DOWN(__pa(address)); + + if (pfn_range_is_mapped(pfn, pfn + 1)) + split_page_count(level); + } /* * Install the new, split up pagetable. |