Re: [PATCH v4] mm/memory: use pmdp_get_lockless() for the pmd read in do_fault_around()

From: David Hildenbrand

Date: Thu Nov 05 2026 - 05:32:17 EST


On Wed, 04 Nov 2026 17:10:50 +0800, Hui Zhu wrote:
> KCSAN reports a data-race in do_read_fault / pmd_install; the same code
> is in mainline:
>
> write (marked) to 0xffff8d52a75fb810 of 8 bytes by task 27487 on cpu 5:
> native_set_pmd arch/x86/include/asm/pgtable_64.h:83 [inline]
> pmd_populate arch/x86/include/asm/pgalloc.h:84 [inline]
> pmd_install+0xe0/0x120 mm/memory.c:444
> finish_fault+0x5bc/0xb00 mm/memory.c:5204
> do_cow_fault mm/memory.c:5432 [inline]
> do_fault+0x5d0/0x6e0 mm/memory.c:5526
> handle_mm_fault+0x211/0x4c0 mm/memory.c:6218
> __mm_populate+0x144/0x270 mm/gup.c:2207
> __do_sys_mlockall+0x2cd/0x380 mm/mlock.c:764
>
> [...]

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: use pmdp_get_lockless() for the pmd read in do_fault_around()
https://git.kernel.org/mm/core/c/6ab55cfd

--
Cheers,

David