aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Price <steven.price@arm.com>2019-11-19 11:47:24 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2019-11-25 17:09:55 +1100
commit3907ac5b27c8437d3c2680b23b295513fe953f13 (patch)
treebc7c4f1d9ee409879475e6337924fcb6fd884123
parent105eb48e92c3391966324aa07fa63db222d48800 (diff)
download96b-common-3907ac5b27c8437d3c2680b23b295513fe953f13.tar.gz
mm-pagewalk-allow-walking-without-vma-fix
fix boot crash Reported-by: Qian Cai <cai@lca.pw> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r--mm/pagewalk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index 626e7fdb0508..f43c0b96f594 100644
--- a/mm/pagewalk.c
+++ b/mm/pagewalk.c
@@ -65,7 +65,7 @@ again:
split_huge_pmd(walk->vma, pmd, addr);
if (pmd_trans_unstable(pmd))
goto again;
- } else if (pmd_leaf(*pmd)) {
+ } else if (pmd_leaf(*pmd) || !pmd_present(*pmd)) {
continue;
}
@@ -107,7 +107,7 @@ static int walk_pud_range(p4d_t *p4d, unsigned long addr, unsigned long end,
split_huge_pud(walk->vma, pud, addr);
if (pud_none(*pud))
goto again;
- } else if (pud_leaf(*pud)) {
+ } else if (pud_leaf(*pud) || !pud_present(*pud)) {
continue;
}