Re: [PATCH 1/6] fs/proc/task_mmu: fix make_uffd_wp_huge_pte() prot-update race
From: Kiryl Shutsemau
Date: Wed Nov 11 2026 - 14:35:44 EST
On Tue, Nov 10, 2026 at 08:23:11AM -0800, Breno Leitao wrote:
> Hello Kiryl,
>
> On Fri, May 29, 2026 at 06:23:25PM +0100, Kiryl Shutsemau (Meta) wrote:
> > The non-hugetlb sibling make_uffd_wp_pte() does this correctly via
> > ptep_modify_prot_start() / ptep_modify_prot_commit(). Mirror that
> > pattern for the present-PTE branch. The migration case stays as-is --
> > migration entries are non-present, so there's no hardware update to
> > race against.
>
> I am seeing this on next-20261109 (arm64, PAGE_TABLE_CHECK) while the
> pagemap_ioctl kselftest runs next to a workload that migrates pages:
>
> WARNING: mm/page_table_check.c:206 at __page_table_check_ptes_set+0x168/0x178, CPU#21: pagemap_ioctl/894691
> Call trace:
> __page_table_check_ptes_set+0x168/0x178 (P)
> __set_ptes_anysz+0x50/0x240
> make_uffd_wp_pte+0x104/0x1c8
> pagemap_scan_pmd_entry+0x1b98/0x1df8
> walk_pgd_range+0x7b4/0xd00
> __walk_page_range+0x108/0x510
> walk_page_range_mm_unsafe+0x150/0x3e8
> do_pagemap_cmd+0x418/0x7d0
> __arm64_sys_ioctl+0xc08/0x1338
>
> given you've touched this recently, I am wondering if you've seen it.
I have not. But I think this patch should help:
https://lore.kernel.org/all/20261111-uffd-state-fixes-v1-3-00713d368976@xxxxxxxxxxxx
--
Kiryl Shutsemau / Kirill A. Shutemov