
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICDSA3 CVE: NA ---------------------------------------- In shrink_page_list(), the hwpoisoned page may be THP, which can't be handled by try_to_unmap(), lead to null-ptr-deref in try_to_unmap_one(). To fix it, skip the hwpoisoned page if it is THP. Fixes: 21b0040ede03 ("mm/vmscan: don't try to reclaim hwpoison folio") Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com> --- mm/vmscan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/vmscan.c b/mm/vmscan.c index df7998e8174f..6a649f02666f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1170,6 +1170,9 @@ static unsigned long shrink_page_list(struct list_head *page_list, goto keep; if (PageHWPoison(page)) { + if (PageTransHuge(page)) + goto keep_locked; + try_to_unmap(page, TTU_IGNORE_MLOCK | TTU_IGNORE_ACCESS); unlock_page(page); put_page(page); -- 2.43.0