[PATCH 00/21] mm/hugetlb: various fixes (2)

From: David Hildenbrand (Arm)

Date: Wed Nov 25 2026 - 17:33:35 EST


Hi,

some more hugetlb fixes, this time not as horrible and confusing stuff as
last time:

- Patch #1: a hotfix for v7.4
- Patch #2 - #18: a bunch of non-urgent fixes
- Patch #19 - #20: two related improvements
- Patch #21: an RFC for a hugetlb cgroup fix

I think patch #21 is the right thing to do, but I am not really a cgroup
expert.

Patch #19 deserves a closer look from our VMA locking experts :)

Patch #1 should go into v7.4, the rest can wait for the next merge
window.

Tested with hugetlb selftests and some targeted tests that reproduce
some of these issues.

Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
---
Chris Mason (8):
mm/hugetlb: fix truncated copy result in UFFDIO_COPY
hugetlbfs: fix deadlock between hole punching and memory failure
hugetlbfs: recheck the vma range after the lock wait
mm/hugetlb: don't zap non-present entries when unmapping a folio
mm/hugetlb: unshare PMDs of a split VMA if allocating its lock fails
mm/hugetlb_cgroup: track in-use folios per cgroup
hugetlbfs: seal SHM_HUGETLB files against growth
mm/hugetlb: resolve protnone faults without a uffd bit

David Hildenbrand (Arm) (13):
mm/hugetlb: charge the copy made at fork to the parent
mm/hugetlb: always mark new page cache folios migratable
mm/memfd: mark new hugetlb folios migratable
mm/hugetlb: free surplus folios of other nodes on free
hugetlbfs: don't zero poisoned pages in a hole punch
mm/hugetlb: only check PMD table sharing for PMD-sized folios
mm/migrate: check hugetlb PMD sharing in move_pages()
mm/hugetlb: don't share page tables of a VMA during mprotect()
mm/hugetlb: count migration entries at fork and unmap
mm/hugetlb: stop accounting HugetlbPages once PMD tables were shared
fs/proc/task_mmu: don't clear VM_SOFTDIRTY on hugetlb VMAs
mm/hugetlb: use the VMA lock to stabilize flags for PMD sharing
RFC: mm/hugetlb_cgroup: charge faults to mm->owner

Documentation/filesystems/proc.rst | 3 +-
fs/hugetlbfs/inode.c | 22 +++--
fs/proc/task_mmu.c | 9 +-
include/linux/hugetlb.h | 22 ++++-
include/linux/hugetlb_cgroup.h | 30 +++++--
include/linux/leafops.h | 11 +++
include/linux/mmap_lock.h | 1 +
mm/hugetlb.c | 174 ++++++++++++++++++++++++++-----------
mm/hugetlb_cgroup.c | 64 ++++++++------
mm/memfd.c | 1 +
mm/mempolicy.c | 2 +-
mm/migrate.c | 23 +++--
mm/mmap_lock.c | 78 +++++++++++------
mm/rmap.c | 4 +-
mm/vma.c | 2 +-
tools/testing/vma/include/stubs.h | 3 +-
16 files changed, 314 insertions(+), 135 deletions(-)
---
base-commit: c8117bff684306f5c1f959d055cc2b24dd67b1eb
change-id: 20261120-hugetlb_fixes_2-26455c584f4e

Best regards,
--
David Hildenbrand (Arm) <david@xxxxxxxxxx>