]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm/memory-failure: check the mapcount of the precise page
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 18 Dec 2023 13:58:36 +0000 (13:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jan 2024 17:51:21 +0000 (18:51 +0100)
commit660b3c3bc8a7e571ff496dad5a94dae599a1c03b
treeb3bba01b91ae02b2d3ef184dc70f8b7682189afa
parent80eb449f809c49a780209f283257e3bd3fee8741
mm/memory-failure: check the mapcount of the precise page

[ Upstream commit c79c5a0a00a9457718056b588f312baadf44e471 ]

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.

Link: https://lkml.kernel.org/r/20231218135837.3310403-3-willy@infradead.org
Fixes: 7af446a841a2 ("HWPOISON, hugetlb: enable error handling path for hugepage")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
mm/memory-failure.c