mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/46] mm: various (urgent?) fixes
@ 2026-10-26 23:17 David Hildenbrand (Arm)
  2026-10-26 23:17 ` [PATCH 01/46] mm/mglru: don't use stack pointers when walking PUD and PMD tables David Hildenbrand (Arm)
                   ` (45 more replies)
  0 siblings, 46 replies; 122+ messages in thread
From: David Hildenbrand (Arm) @ 2026-10-26 23:17 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, David Hildenbrand (Arm),
	Chris Mason

Another set of fixes from the current batch that focuses on all core-mm
things that won't be sent out separately by others. I decided to bundle
these together as they are all over the place.

I have some hugetlb stuff in the works which is pretty horrible
(code wise ;) ), that I will send out once ready. Plus some
low-prio migrate_device oddities + two core-mm things that need more
thought.

This is the biggest set of patches coming from me, so don't be
scared ;)

Once more, some of the stuff is more urgent than others. No fixes are
crazy big and most are easy to review.

The majority are again fixes from Anthropic that I cleaned up or reworked.
While doing that, I found a bunch of other issues and tried to fix them
somewhat cleanly.

I gave it at least some basic testing on x86-64; more testing will be
highly appreciated.

This is based on akpm/mm-stable.

As with the shmem fixes, please prioritize review of these fixes, I want
to get fixes for the issues in a timely manner upstream.

Thanks to everyone helping out with moving the flood of fixes forward :)

---
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

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              | 149 ++++++++++++++++++++++++++++++------------
 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                 |  17 ++++-
 mm/userfaultfd.c              |  72 ++++++++++----------
 mm/util.c                     |  13 ++++
 mm/vma.c                      |  24 +++++--
 mm/vmscan.c                   |   4 +-
 36 files changed, 588 insertions(+), 348 deletions(-)

---

base-commit: 183895979c441e52dbd651b388553b09eaa35cfa

change-id: 20261021-fixes_core-bdf638faf023

--

Cheers,

David


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

end of thread, other threads:[~2026-10-27 19:48 UTC | newest]

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

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

all inboxes | Powered by JetHome®