arm64: mm: fix p?d_leaf()
authorMuchun Song <songmuchun@bytedance.com>
Fri, 22 Apr 2022 06:00:33 +0000 (14:00 +0800)
committerWill Deacon <will@kernel.org>
Fri, 22 Apr 2022 10:28:36 +0000 (11:28 +0100)
commit23bc8f69f0eceecbb87c3801d2e48827d2dca92b
tree05082ad97d3264fe8b343fcddcc88712c26b39f2
parent0ff74a23e08f909ce859039e860f53727dfed0dd
arm64: mm: fix p?d_leaf()

The pmd_leaf() is used to test a leaf mapped PMD, however, it misses
the PROT_NONE mapped PMD on arm64.  Fix it.  A real world issue [1]
caused by this was reported by Qian Cai. Also fix pud_leaf().

Link: https://patchwork.kernel.org/comment/24798260/
Fixes: 8aa82df3c123 ("arm64: mm: add p?d_leaf() definitions")
Reported-by: Qian Cai <quic_qiancai@quicinc.com>
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Link: https://lore.kernel.org/r/20220422060033.48711-1-songmuchun@bytedance.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/pgtable.h