• Hugh Dickins's avatar
    mm/khugepaged: fix conflicting mods to collapse_file() · 0175ab61
    Hugh Dickins authored
    Inserting Ivan Orlov's syzbot fix commit 2ce0bdfe
    ("mm: khugepaged: fix kernel BUG in hpage_collapse_scan_file()")
    ahead of Jiaqi Yan's and David Stevens's commits
    12904d95 ("mm/khugepaged: recover from poisoned file-backed memory")
    cae106dd ("mm/khugepaged: refactor collapse_file control flow")
    ac492b9c ("mm/khugepaged: skip shmem with userfaultfd")
    (all of which restructure collapse_file()) did not work out well.
    
    xfstests generic/086 on huge tmpfs (with accelerated khugepaged) freezes
    (if not on the first attempt, then the 2nd or 3rd) in find_lock_entries()
    while doing drop_caches: the file's xarray seems to have been corrupted,
    with find_get_entry() returning nonsense which makes no progress.
    
    Bisection led to ac492b9c; and diff against earlier working linux-next
    suggested that it's probably down to an errant xas_store(), which does not
    belong with the later changes (and nor does the positioning of warnings). 
    The later changes...
    0175ab61
khugepaged.c 75.3 KB