Skip to content

Commit 00de2c9

Browse files
Qi Zhengakpm00
authored andcommitted
arm64: mm: use ptep_clear() instead of pte_clear() in clear_flush()
In clear_flush(), the original pte may be a present entry, so we should use ptep_clear() to let page_table_check track the pte clearing operation, otherwise it may cause false positive in subsequent set_pte_at(). Link: https://lkml.kernel.org/r/[email protected] Fixes: 42b2547 ("arm64/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK") Signed-off-by: Qi Zheng <[email protected]> Acked-by: Will Deacon <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Kefeng Wang <[email protected]> Cc: Muchun Song <[email protected]> Cc: Pasha Tatashin <[email protected]> Cc: Qi Zheng <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 5003a2b commit 00de2c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/mm/hugetlbpage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static void clear_flush(struct mm_struct *mm,
236236
unsigned long i, saddr = addr;
237237

238238
for (i = 0; i < ncontig; i++, addr += pgsize, ptep++)
239-
pte_clear(mm, addr, ptep);
239+
ptep_clear(mm, addr, ptep);
240240

241241
flush_tlb_range(&vma, saddr, addr);
242242
}

0 commit comments

Comments
 (0)