Skip to content

Commit 2f34c2e

Browse files
Alexander GordeevVasily Gorbik
authored andcommitted
s390/pgtable: Use set_pmd_bit() to invalidate PMD entry
Commit 3a5a8d3 ("mm: fix race between __split_huge_pmd_locked() and GUP-fast") failed to follow the convention and used direct PMD entry modification instead of set_pmd_bit(). Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Link: https://lore.kernel.org/r/a9248694a38cc898d3f0628f59b8abb57d56a416.1772812343.git.agordeev@linux.ibm.com Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent cf8771c commit 2f34c2e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/s390/include/asm/pgtable.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,10 +1744,10 @@ static inline pmd_t pmdp_huge_clear_flush(struct vm_area_struct *vma,
17441744
static inline pmd_t pmdp_invalidate(struct vm_area_struct *vma,
17451745
unsigned long addr, pmd_t *pmdp)
17461746
{
1747-
pmd_t pmd;
1747+
pmd_t pmd = *pmdp;
17481748

1749-
VM_WARN_ON_ONCE(!pmd_present(*pmdp));
1750-
pmd = __pmd(pmd_val(*pmdp) | _SEGMENT_ENTRY_INVALID);
1749+
VM_WARN_ON_ONCE(!pmd_present(pmd));
1750+
pmd = set_pmd_bit(pmd, __pgprot(_SEGMENT_ENTRY_INVALID));
17511751
return pmdp_xchg_direct(vma->vm_mm, addr, pmdp, pmd);
17521752
}
17531753

0 commit comments

Comments
 (0)