Commit 0f8c0258 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'mm-hotfixes-stable-2025-05-25-00-58' of...

Merge tag 'mm-hotfixes-stable-2025-05-25-00-58' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull hotfixes from Andrew Morton:
 "22 hotfixes.

  13 are cc:stable and the remainder address post-6.14 issues or aren't
  considered necessary for -stable kernels. 19 are for MM"

* tag 'mm-hotfixes-stable-2025-05-25-00-58' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (22 commits)
  mailmap: add Jarkko's employer email address
  mm: fix copy_vma() error handling for hugetlb mappings
  memcg: always call cond_resched() after fn()
  mm/hugetlb: fix kernel NULL pointer dereference when replacing free hugetlb folios
  mm: vmalloc: only zero-init on vrealloc shrink
  mm: vmalloc: actually use the in-place vrealloc region
  alloc_tag: allocate percpu counters for module tags dynamically
  module: release codetag section when module load fails
  mm/cma: make detection of highmem_start more robust
  MAINTAINERS: add mm memory policy section
  MAINTAINERS: add mm ksm section
  kasan: avoid sleepable page allocation from atomic context
  highmem: add folio_test_partial_kmap()
  MAINTAINERS: add hung-task detector section
  taskstats: fix struct taskstats breaks backward compatibility since version 15
  mm/truncate: fix out-of-bounds when doing a right-aligned split
  MAINTAINERS: add mm reclaim section
  MAINTAINERS: update page allocator section
  mm: fix VM_UFFD_MINOR == VM_SHADOW_STACK on USERFAULTFD=y && ARM64_GCS=y
  mm: mmap: map MAP_STACK to VM_NOHUGEPAGE only if THP is enabled
  ...
parents d0c22de9 1ec971da
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -313,6 +313,7 @@ Jan Glauber <jan.glauber@gmail.com> <jglauber@cavium.com>
Jan Kuliga <jtkuliga.kdev@gmail.com> <jankul@alatek.krakow.pl>
Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@linux.intel.com>
Jarkko Sakkinen <jarkko@kernel.org> <jarkko@profian.com>
Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@opinsys.com>
Jason Gunthorpe <jgg@ziepe.ca> <jgg@mellanox.com>
Jason Gunthorpe <jgg@ziepe.ca> <jgg@nvidia.com>
Jason Gunthorpe <jgg@ziepe.ca> <jgunthorpe@obsidianresearch.com>
+62 −4
Original line number Diff line number Diff line
@@ -11106,6 +11106,14 @@ L: linuxppc-dev@lists.ozlabs.org
S:	Odd Fixes
F:	drivers/tty/hvc/
HUNG TASK DETECTOR
M:	Andrew Morton <akpm@linux-foundation.org>
R:	Lance Yang <lance.yang@linux.dev>
L:	linux-kernel@vger.kernel.org
S:	Maintained
F:	include/linux/hung_task.h
F:	kernel/hung_task.c
I2C ACPI SUPPORT
M:	Mika Westerberg <westeri@kernel.org>
L:	linux-i2c@vger.kernel.org
@@ -15561,6 +15569,41 @@ W: http://www.linux-mm.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
F:	mm/gup.c
MEMORY MANAGEMENT - KSM (Kernel Samepage Merging)
M:	Andrew Morton <akpm@linux-foundation.org>
M:	David Hildenbrand <david@redhat.com>
R:	Xu Xin <xu.xin16@zte.com.cn>
R:	Chengming Zhou <chengming.zhou@linux.dev>
L:	linux-mm@kvack.org
S:	Maintained
W:	http://www.linux-mm.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
F:	Documentation/admin-guide/mm/ksm.rst
F:	Documentation/mm/ksm.rst
F:	include/linux/ksm.h
F:	include/trace/events/ksm.h
F:	mm/ksm.c
MEMORY MANAGEMENT - MEMORY POLICY AND MIGRATION
M:	Andrew Morton <akpm@linux-foundation.org>
M:	David Hildenbrand <david@redhat.com>
R:	Zi Yan <ziy@nvidia.com>
R:	Matthew Brost <matthew.brost@intel.com>
R:	Joshua Hahn <joshua.hahnjy@gmail.com>
R:	Rakie Kim <rakie.kim@sk.com>
R:	Byungchul Park <byungchul@sk.com>
R:	Gregory Price <gourry@gourry.net>
R:	Ying Huang <ying.huang@linux.alibaba.com>
L:	linux-mm@kvack.org
S:	Maintained
W:	http://www.linux-mm.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
F:	include/linux/mempolicy.h
F:	include/linux/migrate.h
F:	mm/mempolicy.c
F:	mm/migrate.c
F:	mm/migrate_device.c
MEMORY MANAGEMENT - NUMA MEMBLOCKS AND NUMA EMULATION
M:	Andrew Morton <akpm@linux-foundation.org>
M:	Mike Rapoport <rppt@kernel.org>
@@ -15573,7 +15616,7 @@ F: mm/numa_memblks.c
MEMORY MANAGEMENT - PAGE ALLOCATOR
M:	Andrew Morton <akpm@linux-foundation.org>
R:	Vlastimil Babka <vbabka@suse.cz>
M:	Vlastimil Babka <vbabka@suse.cz>
R:	Suren Baghdasaryan <surenb@google.com>
R:	Michal Hocko <mhocko@suse.com>
R:	Brendan Jackman <jackmanb@google.com>
@@ -15581,10 +15624,25 @@ R: Johannes Weiner <hannes@cmpxchg.org>
R:	Zi Yan <ziy@nvidia.com>
L:	linux-mm@kvack.org
S:	Maintained
F:	include/linux/compaction.h
F:	include/linux/gfp.h
F:	include/linux/page-isolation.h
F:	mm/compaction.c
F:	mm/page_alloc.c
F:	include/linux/gfp.h
F:	include/linux/compaction.h
F:	mm/page_isolation.c
MEMORY MANAGEMENT - RECLAIM
M:	Andrew Morton <akpm@linux-foundation.org>
M:	Johannes Weiner <hannes@cmpxchg.org>
R:	David Hildenbrand <david@redhat.com>
R:	Michal Hocko <mhocko@kernel.org>
R:	Qi Zheng <zhengqi.arch@bytedance.com>
R:	Shakeel Butt <shakeel.butt@linux.dev>
R:	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
L:	linux-mm@kvack.org
S:	Maintained
F:	mm/pt_reclaim.c
F:	mm/vmscan.c
MEMORY MANAGEMENT - RMAP (REVERSE MAPPING)
M:	Andrew Morton <akpm@linux-foundation.org>
@@ -25912,7 +25970,7 @@ F: tools/testing/vsock/
VMALLOC
M:	Andrew Morton <akpm@linux-foundation.org>
R:	Uladzislau Rezki <urezki@gmail.com>
M:	Uladzislau Rezki <urezki@gmail.com>
L:	linux-mm@kvack.org
S:	Maintained
W:	http://www.linux-mm.org
+12 −0
Original line number Diff line number Diff line
@@ -104,6 +104,16 @@ DECLARE_PER_CPU(struct alloc_tag_counters, _shared_alloc_tag);

#else /* ARCH_NEEDS_WEAK_PER_CPU */

#ifdef MODULE

#define DEFINE_ALLOC_TAG(_alloc_tag)						\
	static struct alloc_tag _alloc_tag __used __aligned(8)			\
	__section(ALLOC_TAG_SECTION_NAME) = {					\
		.ct = CODE_TAG_INIT,						\
		.counters = NULL };

#else  /* MODULE */

#define DEFINE_ALLOC_TAG(_alloc_tag)						\
	static DEFINE_PER_CPU(struct alloc_tag_counters, _alloc_tag_cntr);	\
	static struct alloc_tag _alloc_tag __used __aligned(8)			\
@@ -111,6 +121,8 @@ DECLARE_PER_CPU(struct alloc_tag_counters, _shared_alloc_tag);
		.ct = CODE_TAG_INIT,						\
		.counters = &_alloc_tag_cntr };

#endif /* MODULE */

#endif /* ARCH_NEEDS_WEAK_PER_CPU */

DECLARE_STATIC_KEY_MAYBE(CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT,
+4 −4
Original line number Diff line number Diff line
@@ -36,10 +36,10 @@ union codetag_ref {
struct codetag_type_desc {
	const char *section;
	size_t tag_size;
	void (*module_load)(struct codetag_type *cttype,
			    struct codetag_module *cmod);
	void (*module_unload)(struct codetag_type *cttype,
			      struct codetag_module *cmod);
	void (*module_load)(struct module *mod,
			    struct codetag *start, struct codetag *end);
	void (*module_unload)(struct module *mod,
			      struct codetag *start, struct codetag *end);
#ifdef CONFIG_MODULES
	void (*module_replaced)(struct module *mod, struct module *new_mod);
	bool (*needs_section_mem)(struct module *mod, unsigned long size);
+5 −5
Original line number Diff line number Diff line
@@ -461,7 +461,7 @@ static inline void memcpy_from_folio(char *to, struct folio *folio,
		const char *from = kmap_local_folio(folio, offset);
		size_t chunk = len;

		if (folio_test_highmem(folio) &&
		if (folio_test_partial_kmap(folio) &&
		    chunk > PAGE_SIZE - offset_in_page(offset))
			chunk = PAGE_SIZE - offset_in_page(offset);
		memcpy(to, from, chunk);
@@ -489,7 +489,7 @@ static inline void memcpy_to_folio(struct folio *folio, size_t offset,
		char *to = kmap_local_folio(folio, offset);
		size_t chunk = len;

		if (folio_test_highmem(folio) &&
		if (folio_test_partial_kmap(folio) &&
		    chunk > PAGE_SIZE - offset_in_page(offset))
			chunk = PAGE_SIZE - offset_in_page(offset);
		memcpy(to, from, chunk);
@@ -522,7 +522,7 @@ static inline __must_check void *folio_zero_tail(struct folio *folio,
{
	size_t len = folio_size(folio) - offset;

	if (folio_test_highmem(folio)) {
	if (folio_test_partial_kmap(folio)) {
		size_t max = PAGE_SIZE - offset_in_page(offset);

		while (len > max) {
@@ -560,7 +560,7 @@ static inline void folio_fill_tail(struct folio *folio, size_t offset,

	VM_BUG_ON(offset + len > folio_size(folio));

	if (folio_test_highmem(folio)) {
	if (folio_test_partial_kmap(folio)) {
		size_t max = PAGE_SIZE - offset_in_page(offset);

		while (len > max) {
@@ -597,7 +597,7 @@ static inline size_t memcpy_from_file_folio(char *to, struct folio *folio,
	size_t offset = offset_in_folio(folio, pos);
	char *from = kmap_local_folio(folio, offset);

	if (folio_test_highmem(folio)) {
	if (folio_test_partial_kmap(folio)) {
		offset = offset_in_page(offset);
		len = min_t(size_t, len, PAGE_SIZE - offset);
	} else
Loading