History

Merge tag 'mm-hotfixes-stable-2026-01-29-09-41' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton: "16 hotfixes. 9 are cc:stable, 12 are for MM. There's a patch series from Pratyush Yadav which fixes a few things in the new-in-6.19 LUO memfd code. Plus the usual shower of singletons - please see the changelogs for details" * tag 'mm-hotfixes-stable-2026-01-29-09-41' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: vmcoreinfo: make hwerr_data visible for debugging mm/zone_device: reinitialize large zone device private folios mm/mm_init: don't cond_resched() in deferred_init_memmap_chunk() if called from deferred_grow_zone() mm/kfence: randomize the freelist on initialization kho: kho_preserve_vmalloc(): don't return 0 when ENOMEM kho: init alloc tags when restoring pages from reserved memory mm: memfd_luo: restore and free memfd_luo_ser on failure mm: memfd_luo: use memfd_alloc_file() instead of shmem_file_setup() memfd: export alloc_file() flex_proportions: make fprop_new_period() hardirq safe mailmap: add entry for Viacheslav Bocharov mm/memory-failure: teach kill_accessing_process to accept hugetlb tail page pfn mm/memory-failure: fix missing ->mf_stats count in hugetlb poison mm, swap: restore swap_space attr aviod kernel panic mm/kasan: fix KASAN poisoning in vrealloc() mm/shmem, swap: fix race of truncate and swap entry split

Linus Torvalds committed 9 months ago

Commit bcb60582 parents 1cac389 bd5878223 files · +239 −87Browse files

Showing the changes to include/linux (3 of 23 files). Show all

Unified · Split

3 files
  1. include/linux/kasan.h +14 −0
  2. include/linux/memfd.h +6 −0
  3. include/linux/memremap.h +6 −3
include/linux/kasan.h+14−0
@@ -641,6 +641,17 @@ kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms, · 640 unmodified lines
641641 __kasan_unpoison_vmap_areas(vms, nr_vms, flags);
642642 }
643643
644+void __kasan_vrealloc(const void *start, unsigned long old_size,
645+ unsigned long new_size);
646+
647+static __always_inline void kasan_vrealloc(const void *start,
648+ unsigned long old_size,
649+ unsigned long new_size)
650+{
651+ if (kasan_enabled())
652+ __kasan_vrealloc(start, old_size, new_size);
653+}
654+
644655 #else /* CONFIG_KASAN_VMALLOC */
645656
646657 static inline void kasan_populate_early_vm_area_shadow(void *start,
@@ -670,6 +681,9 @@ kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms, · 23 unmodified lines
670681 kasan_vmalloc_flags_t flags)
671682 { }
672683
684+static inline void kasan_vrealloc(const void *start, unsigned long old_size,
685+ unsigned long new_size) { }
686+
673687 #endif /* CONFIG_KASAN_VMALLOC */
674688
675689 #if (defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)) && \
include/linux/memfd.h+6−0
@@ -17,6 +17,7 @@ struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx); · 16 unmodified lines
1717 * to by vm_flags_ptr.
1818 */
1919 int memfd_check_seals_mmap(struct file *file, vm_flags_t *vm_flags_ptr);
20+struct file *memfd_alloc_file(const char *name, unsigned int flags);
2021 #else
2122 static inline long memfd_fcntl(struct file *f, unsigned int c, unsigned int a)
2223 {
@@ -31,6 +32,11 @@ static inline int memfd_check_seals_mmap(struct file *file, · 8 unmodified lines
3132 {
3233 return 0;
3334 }
35+
36+static inline struct file *memfd_alloc_file(const char *name, unsigned int flags)
37+{
38+ return ERR_PTR(-EINVAL);
39+}
3440 #endif
3541
3642 #endif /* __LINUX_MEMFD_H */
include/linux/memremap.h+6−3
@@ -224,7 +224,8 @@ static inline bool is_fsdax_page(const struct page *page) · 223 unmodified lines
224224 }
225225
226226 #ifdef CONFIG_ZONE_DEVICE
227−void zone_device_page_init(struct page *page, unsigned int order);
227+void zone_device_page_init(struct page *page, struct dev_pagemap *pgmap,
228+ unsigned int order);
228229 void *memremap_pages(struct dev_pagemap *pgmap, int nid);
229230 void memunmap_pages(struct dev_pagemap *pgmap);
230231 void *devm_memremap_pages(struct device *dev, struct dev_pagemap *pgmap);
@@ -234,9 +235,11 @@ bool pgmap_pfn_valid(struct dev_pagemap *pgmap, unsigned long pfn); · 3 unmodified lines
234235
235236 unsigned long memremap_compat_align(void);
236237
237−static inline void zone_device_folio_init(struct folio *folio, unsigned int order)
238+static inline void zone_device_folio_init(struct folio *folio,
239+ struct dev_pagemap *pgmap,
240+ unsigned int order)
238241 {
239− zone_device_page_init(&folio->page, order);
242+ zone_device_page_init(&folio->page, pgmap, order);
240243 if (order)
241244 folio_set_large_rmappable(folio);
242245 }