diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-10-07 00:40:17 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-10-07 00:40:17 +0200 |
commit | b08cadbd3b8721db738d9a00ef3ce3ed667e6d9c (patch) | |
tree | 1b44ef760764ea19f82fd80088135d23ab565d2d /arch/x86/xen/mmu_pv.c | |
parent | db2b0c5d7b6f19b3c2cab08c531b65342eb5252b (diff) | |
parent | fe255fe6ad97685e5a4be0d871f43288dbc10ad6 (diff) |
Merge branch 'objtool/urgent'
Fixup conflicts.
# Conflicts:
# tools/objtool/check.c
Diffstat (limited to 'arch/x86/xen/mmu_pv.c')
-rw-r--r-- | arch/x86/xen/mmu_pv.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index b9a4f797ec1a..823660738bad 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -1519,14 +1519,17 @@ static inline void xen_alloc_ptpage(struct mm_struct *mm, unsigned long pfn, if (pinned) { struct page *page = pfn_to_page(pfn); - if (static_branch_likely(&xen_struct_pages_ready)) + pinned = false; + if (static_branch_likely(&xen_struct_pages_ready)) { + pinned = PagePinned(page); SetPagePinned(page); + } xen_mc_batch(); __set_pfn_prot(pfn, PAGE_KERNEL_RO); - if (level == PT_PTE && USE_SPLIT_PTE_PTLOCKS) + if (level == PT_PTE && USE_SPLIT_PTE_PTLOCKS && !pinned) __pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn); xen_mc_issue(PARAVIRT_LAZY_MMU); |