Re: [PATCH] mm/memory-failure: teach kill_accessing_process to accept hugetlb tail page pfn

From: jane . chu

Date: Mon Dec 22 2025 - 15:42:46 EST




On 12/20/2025 3:13 PM, Andrew Morton wrote:
On Thu, 18 Dec 2025 23:28:19 -0700 Jane Chu <jane.chu@xxxxxxxxxx> wrote:

When a hugetlb folio is being poisoned again, try_memory_failure_hugetlb()
passed head pfn to kill_accessing_process(), that is not right.
The precise pfn of the poisoned page should be used in order to
determine the precise vaddr as the SIGBUS payload.

This issue has already been taken care of in the normal path, that is,
hwpoison_user_mappings(), see [1][2]. Further more, for [3] to work
correctly in the hugetlb repoisoning case, it's essential to inform
VM the precise poisoned page, not the head page.

This conflicts with your "mm/memory-failure: fix missing ->mf_stats
count in hugetlb poison".

Also conflicts a bit with "mm: fixup pfnmap memory failure handling to
use pgoff" but that one isn't cc:stable, so this patch (which *is*
cc:stable) takes priority.

Help?


Sorry Andrew. Let me try rebase v3 on top of my other patch. Will also take a look at this other conflict.

thanks,
-jane