Check first whether the pud is leaf one before trying to call pud_entry. Signed-off-by: Oscar Salvador <osalvador@xxxxxxx> --- mm/pagewalk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/pagewalk.c b/mm/pagewalk.c index eba705def9a0..d93e77411482 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c @@ -155,7 +155,7 @@ static int walk_pud_range(p4d_t *p4d, unsigned long addr, unsigned long end, walk->action = ACTION_SUBTREE; - if (ops->pud_entry) + if (ops->pud_entry && pud_leaf(*pud)) err = ops->pud_entry(pud, addr, next, walk); if (err) break; -- 2.26.2