FAILED: patch "[PATCH] mm/memory-failure: check the mapcount of the precise page" failed to apply to 5.4-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y
git checkout FETCH_HEAD
git cherry-pick -x c79c5a0a00a9457718056b588f312baadf44e471
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024010214-creative-deck-d169@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..
Possible dependencies:
c79c5a0a00a9 ("mm/memory-failure: check the mapcount of the precise page")96f96763de26 ("mm: memory-failure: convert to pr_fmt()")98931dd95fd4 ("Merge tag 'mm-stable-2022-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c79c5a0a00a9457718056b588f312baadf44e471 Mon Sep 17 00:00:00 2001
From: "Matthew Wilcox (Oracle)" <[email protected]>
Date: Mon, 18 Dec 2023 13:58:36 +0000
Subject: [PATCH] mm/memory-failure: check the mapcount of the precise page
A process may map only some of the pages in a folio, and might be missed if it maps the poisoned page but not the head page. Or it might be unnecessarily hit if it maps the head page, but not the poisoned page.
mm/memory-failure.c +3 -3
@@ -1570,7 +1570,7 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn,* This check implies we don't kill processes if their pages * are in the swap cache early. Those are always late kills. */ -if (!page_mapped (hpage)) +if (!page_mapped (p))return true;if (PageSwapCache (p)) {
@@ -1621,10 +1621,10 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn,try_to_unmap (folio, ttu); } - unmap_success = !page_mapped (hpage); + unmap_success = !page_mapped (p);if (!unmap_success)pr_err ("%#lx: failed to unmap page (mapcount=%d)\n" , - pfn,page_mapcount (hpage)); + pfn,page_mapcount (p));/* * try_to_unmap() might put mlocked page in lru cache, so call