Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/47] mm: various (urgent?) fixes
@ 2026-10-29 20:32 David Hildenbrand (Arm)
  2026-10-29 20:32 ` [PATCH v2 01/47] mm/mglru: don't use stack pointers when walking PUD and PMD tables David Hildenbrand (Arm)
                   ` (47 more replies)
  0 siblings, 48 replies; 70+ messages in thread
From: David Hildenbrand (Arm) @ 2026-10-29 20:32 UTC (permalink / raw)
  To: Andrew Morton, Johannes Weiner, Michal Hocko, Qi Zheng,
	Shakeel Butt, Lorenzo Stoakes, Kairui Song, Barry Song,
	Axel Rasmussen, Yuanchu Xie, Wei Xu, Baoquan He, Baolin Wang,
	Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
	Suren Baghdasaryan, Michal Hocko, Kees Cook, Peter Zijlstra,
	Jann Horn, Pedro Falcato, Hugh Dickins, Pasha Tatashin,
	Pratyush Yadav, Matthew Wilcox (Oracle), Jan Kara, Zi Yan,
	Lance Yang, Rik van Riel, Harry Yoo, Alistair Popple, Nico Pache,
	Ryan Roberts, Dev Jain, Usama Arif, Kiryl Shutsemau,
	Matthew Brost, John Hubbard, Peter Xu, Will Deacon,
	Aneesh Kumar K.V, Nick Piggin, Oscar Salvador, Minchan Kim,
	Muchun Song, Xu Xin, Chengming Zhou, Chris Li, Kemeng Shi,
	Nhat Pham, Youngjun Park, Gregory Price, Joshua Hahn, Rakie Kim,
	Ying Huang, Jason Gunthorpe
  Cc: linux-mm, linux-kernel, kexec, linux-fsdevel, linux-arch,
	linux-cxl, Josef Bacik, stable, Muhammad Usama Anjum,
	David Hildenbrand (Arm), Chris Mason,
	Thadeu Lima de Souza Cascardo, Mani Tofigh, Samiullah Khawaja

See v1 on details. TL;DR various fixes :)

Thanks to everyone for the review! Hoping I can get some more? :)

I am planning on picking these myself, moving them to linux-next fairly
soon through mm/core.git.

---
Changes in v2:
- "mm/memfd: check for real shmem inodes before accessing shmem state"
 - Call it inode_is_shmem
- "mm/truncate: look again if a folio left the mapping"
 - Different fix for truncate_inode_pages_range
 - Adjust description
- "mm/huge_memory: fix zapping migration entries for device-private THPs"
 - Move handling in zap_deposited_table
- "mm/mmu_gather: fix flushing ranges with 4 GiB or larger"
 - Adjust description"
- "mm/huge_memory: split huge PUDs when adjusting VMA boundaries"
 - Drop split_pud check
- Link to v1: https://patch.msgid.link/20261027-fixes_core-v1-0-6f74bec9a5bb@kernel.org

---

Chris Mason (11):
      mm/huge_memory: fix truncate racing with PMD zapping
      mm/huge_memory: fix zapping migration entries for device-private THPs
      mm/khugepaged: preserve dirty bits when collapsing PTE-mapped THPs
      mm/gup: fix clearing folios in memfd_pin_folios()
      mm/gup: fix out-of-bounds write for nr_pages == 0 in GUP-fast
      mm/mmu_notifier: set ->mm only after mmgrab()
      mm/memory: reject remote COW faults on PFN mappings
      mm: fix unkillable fault loop on MAP_DROPPABLE memory
      mm: fix deadlock of mremap() against UFFDIO_MOVE
      mm/ksm: check large swap-cache folios before mapping them
      mm/vma: call ->may_split() before a partial merge

David Hildenbrand (Arm) (20):
      fork: take mmap_lock before copying mm_struct
      mm/memfd: check for real shmem inodes before accessing shmem state
      mm/truncate: look again if a folio left the mapping
      mm/filemap: finish fault cleanup before dropping the fault lock
      mm/rmap: handle device-exclusive entries in folio_referenced_one()
      mm/huge_memory: fix list corruption when deferred_split_scan() races with deferred_split_folio()
      mm/huge_memory: properly handle refcounted PUD mappings on fork
      mm/khugepaged: check if PTE table is empty in try_collapse_pte_mapped_thp()
      mm/gup: recheck the PUD under PTL in follow_pud_mask()
      mm/gup: check for overflow when converting nr_pages to bytes in GUP-fast
      mm/userfaultfd: write-lock the VMA before waking waiters when unregistering
      mm/userfaultfd: wake waiters when registration modes are removed
      mm/mremap: use pudp_huge_get_and_clear() when moving huge PUDs
      mm/mremap: recheck PUDs under the page table lock
      mm/madvise: fix data loss from MADV_FREE on a KSM page
      mm/ksm: reset the unstable trees of all nodes
      mm/ksm: fix use of a freed anon_vma at swap-in
      mm/huge_memory: split huge PUDs when adjusting VMA boundaries
      mm/vma: don't leak the charge for stack growth
      mm/memory-tiers: unregister empty tiers outside memory_tier_lock

Gregory Price (1):
      mm/userfaultfd: compare exact registration modes before skipping

Josef Bacik (14):
      mm/mglru: don't use stack pointers when walking PUD and PMD tables
      mm/memfd: make f_pos accesses atomic
      mm/filemap: read mapping->a_ops->free_folio under i_lock
      mm/filemap: don't lose a folio lock wakeup to a signal
      mm/huge_memory: fix livelock on device private folio
      mm/khugepaged: always recheck the pmd in try_collapse_pte_mapped_thp()
      mm/khugepaged: fix PMD table lock leak in try_collapse_pte_mapped_thp()
      mm/userfaultfd: wake all waiters on unregister
      mm/mmu_gather: fix flushing ranges with 4 GiB or larger
      mm/mmu_notifier: finish non-blocking interval invalidation on error
      mm/mremap: fix moving PUD leaves
      mm/memory_hotplug: avoid races in pfn_to_online_page() with dying pgmap
      mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit
      fs/proc/task_mmu: refuse addresses beyond 32 bits on 32bit

Rik van Riel (1):
      mm/cma: don't release CMA pages still in use

 fs/proc/task_mmu.c            |   6 ++
 include/asm-generic/tlb.h     |   3 +-
 include/linux/huge_mm.h       |   5 +-
 include/linux/ksm.h           |   6 +-
 include/linux/memremap.h      |   6 ++
 include/linux/mmu_notifier.h  |   3 +-
 include/linux/shmem_fs.h      |   6 ++
 include/linux/userfaultfd_k.h |   2 -
 kernel/fork.c                 |  20 ++++--
 mm/cma.c                      |  10 ++-
 mm/filemap.c                  |  88 ++++++++++++-------------
 mm/gup.c                      |  53 ++++++++++-----
 mm/huge_memory.c              | 146 +++++++++++++++++++++++++++++++-----------
 mm/hugetlb.c                  |  14 +---
 mm/internal.h                 |  28 ++++++++
 mm/khugepaged.c               |  77 +++++++++++-----------
 mm/ksm.c                      |  56 ++++++++++++----
 mm/madvise.c                  |   9 +++
 mm/memfd.c                    |  10 ++-
 mm/memfd_luo.c                |   2 +-
 mm/memory-tiers.c             |  29 ++++-----
 mm/memory.c                   |  30 ++++++---
 mm/memory_hotplug.c           |  13 ++--
 mm/memremap.c                 |  13 ++++
 mm/mmap.c                     |   8 +--
 mm/mmu_notifier.c             |  24 +++++--
 mm/mremap.c                   | 103 +++++++++++++----------------
 mm/nommu.c                    |   2 +-
 mm/rmap.c                     |  23 +++++--
 mm/shmem.c                    |   5 ++
 mm/swapfile.c                 |   3 +-
 mm/truncate.c                 |  13 +++-
 mm/userfaultfd.c              |  75 ++++++++++------------
 mm/util.c                     |  13 ++++
 mm/vma.c                      |  24 +++++--
 mm/vmscan.c                   |   4 +-
 36 files changed, 585 insertions(+), 347 deletions(-)

---

base-commit: 65ba8f34ec886ec72b2c07ddc8cf3d815c32869d

change-id: 20261021-fixes_core-bdf638faf023

--

Cheers,

David



^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2026-10-30 17:55 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 20:32 [PATCH v2 00/47] mm: various (urgent?) fixes David Hildenbrand (Arm)
2026-10-29 20:32 ` [PATCH v2 01/47] mm/mglru: don't use stack pointers when walking PUD and PMD tables David Hildenbrand (Arm)
2026-10-30  0:20   ` SJ Park
2026-10-30 10:21     ` David Hildenbrand (Arm)
2026-10-29 20:32 ` [PATCH v2 02/47] fork: take mmap_lock before copying mm_struct David Hildenbrand (Arm)
2026-10-30  0:34   ` SJ Park
2026-10-29 20:32 ` [PATCH v2 03/47] mm/memfd: check for real shmem inodes before accessing shmem state David Hildenbrand (Arm)
2026-10-30 11:33   ` Pratyush Yadav
2026-10-30 12:06     ` David Hildenbrand (Arm)
2026-10-30 12:29       ` Pratyush Yadav
2026-10-30 14:35         ` David Hildenbrand (Arm)
2026-10-29 20:32 ` [PATCH v2 04/47] mm/memfd: make f_pos accesses atomic David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 05/47] mm/truncate: look again if a folio left the mapping David Hildenbrand (Arm)
2026-10-30 17:13   ` Kiryl Shutsemau
2026-10-30 17:15   ` Zi Yan
2026-10-29 20:33 ` [PATCH v2 06/47] mm/filemap: read mapping->a_ops->free_folio under i_lock David Hildenbrand (Arm)
2026-10-30 17:55   ` Zi Yan
2026-10-29 20:33 ` [PATCH v2 07/47] mm/filemap: don't lose a folio lock wakeup to a signal David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 08/47] mm/filemap: finish fault cleanup before dropping the fault lock David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 09/47] mm/rmap: handle device-exclusive entries in folio_referenced_one() David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 10/47] mm/huge_memory: fix list corruption when deferred_split_scan() races with deferred_split_folio() David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 11/47] mm/huge_memory: properly handle refcounted PUD mappings on fork David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 12/47] mm/huge_memory: fix livelock on device private folio David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 13/47] mm/huge_memory: fix truncate racing with PMD zapping David Hildenbrand (Arm)
2026-10-29 22:37   ` Gregory Price (Meta)
2026-10-29 20:33 ` [PATCH v2 14/47] mm/huge_memory: fix zapping migration entries for device-private THPs David Hildenbrand (Arm)
2026-10-29 22:30   ` Gregory Price (Meta)
2026-10-30 11:10     ` David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 15/47] mm/khugepaged: always recheck the pmd in try_collapse_pte_mapped_thp() David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 16/47] mm/khugepaged: fix PMD table lock leak " David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 17/47] mm/khugepaged: preserve dirty bits when collapsing PTE-mapped THPs David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 18/47] mm/khugepaged: check if PTE table is empty in try_collapse_pte_mapped_thp() David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 19/47] mm/gup: recheck the PUD under PTL in follow_pud_mask() David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 20/47] mm/gup: fix clearing folios in memfd_pin_folios() David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 21/47] mm/gup: fix out-of-bounds write for nr_pages == 0 in GUP-fast David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 22/47] mm/gup: check for overflow when converting nr_pages to bytes " David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 23/47] mm/userfaultfd: write-lock the VMA before waking waiters when unregistering David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 24/47] mm/userfaultfd: wake all waiters on unregister David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 25/47] mm/userfaultfd: wake waiters when registration modes are removed David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 26/47] mm/userfaultfd: compare exact registration modes before skipping David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 27/47] mm/mmu_gather: fix flushing ranges with 4 GiB or larger David Hildenbrand (Arm)
2026-10-30  0:57   ` SJ Park
2026-10-30 11:15     ` David Hildenbrand (Arm)
2026-10-30 11:19       ` David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 28/47] mm/mmu_notifier: finish non-blocking interval invalidation on error David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 29/47] mm/mmu_notifier: set ->mm only after mmgrab() David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 30/47] mm/mremap: use pudp_huge_get_and_clear() when moving huge PUDs David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 31/47] mm/mremap: recheck PUDs under the page table lock David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 32/47] mm/mremap: fix moving PUD leaves David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 33/47] mm/memory_hotplug: avoid races in pfn_to_online_page() with dying pgmap David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 34/47] mm/madvise: fix data loss from MADV_FREE on a KSM page David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 35/47] mm/memory: reject remote COW faults on PFN mappings David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 36/47] mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 37/47] mm: fix unkillable fault loop on MAP_DROPPABLE memory David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 38/47] mm: fix deadlock of mremap() against UFFDIO_MOVE David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 39/47] mm/ksm: reset the unstable trees of all nodes David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 40/47] mm/ksm: fix use of a freed anon_vma at swap-in David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 41/47] mm/ksm: check large swap-cache folios before mapping them David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 42/47] mm/vma: call ->may_split() before a partial merge David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 43/47] mm/huge_memory: split huge PUDs when adjusting VMA boundaries David Hildenbrand (Arm)
2026-10-30 17:14   ` Kiryl Shutsemau
2026-10-29 20:33 ` [PATCH v2 44/47] mm/vma: don't leak the charge for stack growth David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 45/47] mm/cma: don't release CMA pages still in use David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 46/47] mm/memory-tiers: unregister empty tiers outside memory_tier_lock David Hildenbrand (Arm)
2026-10-29 20:33 ` [PATCH v2 47/47] fs/proc/task_mmu: refuse addresses beyond 32 bits on 32bit David Hildenbrand (Arm)
2026-10-30 11:19 ` [PATCH v2 00/47] mm: various (urgent?) fixes Muhammad Usama Anjum
2026-10-30 11:35   ` David Hildenbrand (Arm)
2026-10-30 12:12     ` Muhammad Usama Anjum
2026-10-30 13:10       ` Chris Mason
2026-10-30 14:37         ` David Hildenbrand (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox