Commit c6e99c10 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'mm-hotfixes-stable-2026-05-18-21-07' of...

Merge tag 'mm-hotfixes-stable-2026-05-18-21-07' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "14 hotfixes. 9 are for MM. 10 are cc:stable and the remainder are for
  post-7.1 issues or aren't deemed suitable for backporting.

  There's a two-patch MAINTAINERS series from Mike Rapoport which
  updates us for the new KEXEC/KDUMP/crash/LUO/etc arrangements. And
  another two-patch series from Muchun Song to fix a couple of
  memory-hotplug issues. Otherwise singletons, please see the changelogs
  for details"

* tag 'mm-hotfixes-stable-2026-05-18-21-07' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm/memory: fix spurious warning when unmapping device-private/exclusive pages
  mm: fix __vm_normal_page() to handle missing support for pmd_special()/pud_special()
  drivers/base/memory: fix memory block reference leak in poison accounting
  mm/memory_hotplug: fix memory block reference leak on remove
  lib: kunit_iov_iter: fix test fail on powerpc
  mm/page_alloc: fix initialization of tags of the huge zero folio with init_on_free
  MAINTAINERS: add kexec@ list to LIVE UPDATE ENTRY
  MAINTAINERS: add tree for KDUMP and KEXEC
  selftests/mm: run_vmtests.sh: fix destructive tests invocation
  scripts/gdb: slab: update field names of struct kmem_cache
  scripts/gdb: mm: cast untyped symbols in x86_page_ops
  mm/damon: fix damos_stat tracepoint format for sz_applied
  mm/damon/sysfs-schemes: call missing mem_cgroup_iter_break()
  mm/migrate_device: fix spinlock leak in migrate_vma_insert_huge_pmd_page
parents ab5fce87 be3f38d0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -13869,6 +13869,7 @@ M: Pratyush Yadav <pratyush@kernel.org>
R:	Dave Young <ruirui.yang@linux.dev>
L:	kexec@lists.infradead.org
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git
F:	Documentation/admin-guide/kdump/
F:	fs/proc/vmcore.c
F:	include/linux/crash_core.h
@@ -14186,6 +14187,7 @@ M: Pasha Tatashin <pasha.tatashin@soleen.com>
M:	Pratyush Yadav <pratyush@kernel.org>
L:	kexec@lists.infradead.org
W:	http://kernel.org/pub/linux/utils/kernel/kexec/
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git
F:	include/linux/kexec.h
F:	include/uapi/linux/kexec.h
F:	kernel/kexec*
@@ -14902,6 +14904,7 @@ LIVE UPDATE
M:	Pasha Tatashin <pasha.tatashin@soleen.com>
M:	Mike Rapoport <rppt@kernel.org>
M:	Pratyush Yadav <pratyush@kernel.org>
L:	kexec@lists.infradead.org
L:	linux-kernel@vger.kernel.org
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma,
						unsigned long vaddr);
#define vma_alloc_zeroed_movable_folio vma_alloc_zeroed_movable_folio

bool tag_clear_highpages(struct page *to, int numpages);
bool tag_clear_highpages(struct page *to, int numpages, bool clear_pages);
#define __HAVE_ARCH_TAG_CLEAR_HIGHPAGES

#define copy_user_page(to, from, vaddr, pg)	copy_page(to, from)
+7 −4
Original line number Diff line number Diff line
@@ -1018,7 +1018,7 @@ struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma,
	return vma_alloc_folio(flags, 0, vma, vaddr);
}

bool tag_clear_highpages(struct page *page, int numpages)
bool tag_clear_highpages(struct page *page, int numpages, bool clear_pages)
{
	/*
	 * Check if MTE is supported and fall back to clear_highpage().
@@ -1026,13 +1026,16 @@ bool tag_clear_highpages(struct page *page, int numpages)
	 * post_alloc_hook() will invoke tag_clear_highpages().
	 */
	if (!system_supports_mte())
		return false;
		return clear_pages;

	/* Newly allocated pages, shouldn't have been tagged yet */
	for (int i = 0; i < numpages; i++, page++) {
		WARN_ON_ONCE(!try_page_mte_tagging(page));
		if (clear_pages)
			mte_zero_clear_page_tags(page_address(page));
		else
			mte_clear_page_tags(page_address(page));
		set_page_mte_tagged(page);
	}
	return true;
	return false;
}
+6 −2
Original line number Diff line number Diff line
@@ -1230,8 +1230,10 @@ void memblk_nr_poison_inc(unsigned long pfn)
	const unsigned long block_id = pfn_to_block_id(pfn);
	struct memory_block *mem = find_memory_block_by_id(block_id);

	if (mem)
	if (mem) {
		atomic_long_inc(&mem->nr_hwpoison);
		put_device(&mem->dev);
	}
}

void memblk_nr_poison_sub(unsigned long pfn, long i)
@@ -1239,8 +1241,10 @@ void memblk_nr_poison_sub(unsigned long pfn, long i)
	const unsigned long block_id = pfn_to_block_id(pfn);
	struct memory_block *mem = find_memory_block_by_id(block_id);

	if (mem)
	if (mem) {
		atomic_long_sub(i, &mem->nr_hwpoison);
		put_device(&mem->dev);
	}
}

static unsigned long memblk_nr_poison(struct memory_block *mem)
+5 −5
Original line number Diff line number Diff line
@@ -273,11 +273,11 @@ enum {
 *
 * %__GFP_ZERO returns a zeroed page on success.
 *
 * %__GFP_ZEROTAGS zeroes memory tags at allocation time if the memory itself
 * is being zeroed (either via __GFP_ZERO or via init_on_alloc, provided that
 * __GFP_SKIP_ZERO is not set). This flag is intended for optimization: setting
 * memory tags at the same time as zeroing memory has minimal additional
 * performance impact.
 * %__GFP_ZEROTAGS zeroes memory tags at allocation time. Setting memory tags at
 * the same time as zeroing memory (e.g., with __GFP_ZERO) has minimal
 * additional performance impact. However, __GFP_ZEROTAGS also zeroes the tags
 * even if memory is not getting zeroed at allocation time (e.g.,
 * with init_on_free).
 *
 * %__GFP_SKIP_KASAN makes KASAN skip unpoisoning on page allocation.
 * Used for userspace and vmalloc pages; the latter are unpoisoned by
Loading