mm/memory-failure: pass the folio and the page to collect_procs()
[platform/kernel/linux-starfive.git] / mm / pagewalk.c
index 9b2d23f..b7d7e4f 100644 (file)
@@ -58,7 +58,7 @@ static int walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
                        pte = pte_offset_map(pmd, addr);
                if (pte) {
                        err = walk_pte_range_inner(pte, addr, end, walk);
-                       if (walk->mm != &init_mm)
+                       if (walk->mm != &init_mm && addr < TASK_SIZE)
                                pte_unmap(pte);
                }
        } else {