Re: [PATCH] mm/memory: don't map hardware-poisoned pages in finish_fault()

From: David Hildenbrand

Date: Thu Nov 19 2026 - 11:45:57 EST


On Thu, 19 Nov 2026 13:42:31 +0000, Kiryl Shutsemau (Meta) wrote:
> When memory_failure() cannot split a large file folio, the folio stays in
> the page cache with the poisoned page in it. do_set_pmd() refuses to map
> such a folio with a PMD, so that the poisoned page gets its own fault and
> SIGBUS. finish_fault() then falls back to PTEs, but maps the whole folio:
>
> do_shared_fault()
> __do_fault()
> PageHWPoison(vmf->page)
> // the faulting page only
> finish_fault()
> do_set_pmd()
> // backs off on has_hwpoisoned
> set_pte_range(vmf, folio, &folio->page, folio_nr_pages(folio), ...)
> // maps the poisoned page as well
>
> [...]

Applied, thanks!

tree: mm/core.git
branch: core-7.5.misc

Applied patches will appear soon in mm-next, followed by linux-next.

Please report any outstanding bugs that were missed during review, so we
can either drop the patch series or decide how to fix it up.

It is encouraged to provide Acked-bys, Reviewed-bys, and Tested-bys even
though the patches have already been applied. If possible, patch trailers
will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. Further, this is not a guarantee that the
patches will go upstream. If in doubt, please check the listed branch.

[1/1] mm/memory: don't map hardware-poisoned pages in finish_fault()
https://git.kernel.org/mm/core/c/2c536883

--
Cheers,

David