The patch titled Subject: mm-memory-failure-send-sigbus-in-the-event-of-thp-split-fail-fix has been added to the -mm mm-unstable branch. Its filename is mm-memory-failure-send-sigbus-in-the-event-of-thp-split-fail-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-memory-failure-send-sigbus-in-the-event-of-thp-split-fail-fix.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm 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/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mm-memory-failure-send-sigbus-in-the-event-of-thp-split-fail-fix Date: Thu May 2 04:07:39 PM PDT 2024 update for folio conversions Cc: Jane Chu <jane.chu@xxxxxxxxxx> Cc: Miaohe Lin <linmiaohe@xxxxxxxxxx> Cc: Naoya Horiguchi <nao.horiguchi@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory-failure.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- a/mm/memory-failure.c~mm-memory-failure-send-sigbus-in-the-event-of-thp-split-fail-fix +++ a/mm/memory-failure.c @@ -2170,16 +2170,15 @@ out: * election for MCE early killed will be honored. */ static int kill_procs_now(struct page *p, unsigned long pfn, int flags, - struct page *hpage) + struct folio *folio) { - struct folio *folio = page_folio(hpage); LIST_HEAD(tokill); int res = -EHWPOISON; /* deal with user pages only */ if (PageReserved(p) || PageSlab(p) || PageTable(p) || PageOffline(p)) res = -EBUSY; - if (!(PageLRU(hpage) || PageHuge(p))) + if (!(folio_test_lru(folio) || PageHuge(p))) res = -EBUSY; if (res == -EHWPOISON) { @@ -2324,7 +2323,7 @@ try_again: if (try_to_split_thp_page(p) < 0) { if (flags & MF_ACTION_REQUIRED) { pr_err("%#lx: thp split failed\n", pfn); - res = kill_procs_now(p, pfn, flags, hpage); + res = kill_procs_now(p, pfn, flags, folio); goto unlock_mutex; } res = action_result(pfn, MF_MSG_UNSPLIT_THP, MF_IGNORED); _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are arm-mm-drop-vm_fault_badmap-vm_fault_badaccess-checkpatch-fixes.patch mm-hugetlb-rename-dissolve_free_huge_pages-to-dissolve_free_hugetlb_folios-fix.patch doc-split-bufferrst-out-of-api-summaryrst-fix-fix.patch mm-memory-failure-send-sigbus-in-the-event-of-thp-split-fail-fix.patch __mod_memcg_lruvec_state-enhance-diagnostics.patch __mod_memcg_lruvec_state-enhance-diagnostics-fix.patch