The patch titled Subject: mm/hwpoison: fix failure to split thp w/ refcount held has been added to the -mm tree. Its filename is mm-hwpoison-fix-fail-to-split-thp-w-refcount-held.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-hwpoison-fix-fail-to-split-thp-w-refcount-held.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-hwpoison-fix-fail-to-split-thp-w-refcount-held.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Wanpeng Li <wanpeng.li@xxxxxxxxxxx> Subject: mm/hwpoison: fix failure to split thp w/ refcount held THP pages will get a refcount in madvise_hwpoison() w/ MF_COUNT_INCREASED flag, however, the refcount is still held when fail to split THP pages. Fix it by reducing the refcount of THP pages when fail to split THP. Signed-off-by: Wanpeng Li <wanpeng.li@xxxxxxxxxxx> Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory-failure.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN mm/memory-failure.c~mm-hwpoison-fix-fail-to-split-thp-w-refcount-held mm/memory-failure.c --- a/mm/memory-failure.c~mm-hwpoison-fix-fail-to-split-thp-w-refcount-held +++ a/mm/memory-failure.c @@ -1725,6 +1725,8 @@ int soft_offline_page(struct page *page, if (PageAnon(hpage) && unlikely(split_huge_page(hpage))) { pr_info("soft offline: %#lx: failed to split THP\n", pfn); + if (flags & MF_COUNT_INCREASED) + put_page(page); return -EBUSY; } } _ Patches currently in -mm which might be from wanpeng.li@xxxxxxxxxxx are mm-hwpoison-fix-page-refcount-of-unkown-non-lru-page.patch mm-hwpoison-fix-fail-isolate-hugetlbfs-page-w-refcount-held.patch mm-hwpoison-fix-panic-due-to-split-huge-zero-page.patch mm-hwpoison-fix-fail-to-split-thp-w-refcount-held.patch mm-hwpoison-fix-pagehwpoison-test-set-race.patch mm-hwpoison-introduce-put_hwpoison_page-to-put-refcount-for-memory-error-handling.patch mm-hwpoison-introduce-put_hwpoison_page-to-put-refcount-for-memory-error-handling-fix.patch mm-hwpoison-fix-refcount-of-thp-head-page-in-no-injection-case.patch mm-hwpoison-replace-most-of-put_page-in-memory-error-handling-by-put_hwpoison_page.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html