Re: [PATCH v2 0/4] mm: fix races between huge and non-huge faults in PFN mappings
From: David Hildenbrand
Date: Wed Nov 18 2026 - 10:17:40 EST
On Tue, 17 Nov 2026 18:31:31 +0000, Lorenzo Stoakes (ARM) wrote:
> A driver that implements both ->fault and ->huge_fault must anticipate
> concurrent use of both.
>
> This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE)
> concurrent with faulting, as that only holds the mmap write lock and thus
> does not exclude faulting threads stabilised by VMA lock.
>
> [...]
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/4] mm: update walk_to_pmd() to explicitly return an error
https://git.kernel.org/mm/core/c/977781a1
[2/4] mm/memory: remove racy huge PMD assertion from walk_to_pmd()
https://git.kernel.org/mm/core/c/dffaff24
[3/4] mm/memory: do not report OOM if insert_pfn() races a huge fault
https://git.kernel.org/mm/core/c/6aaf0015
[4/4] mm/huge_memory: only compare PFNs of huge entries on huge fault insert
https://git.kernel.org/mm/core/c/bc5cff91
--
Cheers,
David