Skip to content

Commit 03cc357

Browse files
committed
Merge tag 'mm-hotfixes-stable-2025-02-01-03-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc fixes from Andrew Morton: "21 hotfixes. 8 are cc:stable and the remainder address post-6.13 issues. 13 are for MM and 8 are for non-MM. All are singletons, please see the changelogs for details" * tag 'mm-hotfixes-stable-2025-02-01-03-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (21 commits) MAINTAINERS: include linux-mm for xarray maintenance revert "xarray: port tests to kunit" MAINTAINERS: add lib/test_xarray.c mailmap, MAINTAINERS, docs: update Carlos's email address mm/hugetlb: fix hugepage allocation for interleaved memory nodes mm: gup: fix infinite loop within __get_longterm_locked mm, swap: fix reclaim offset calculation error during allocation .mailmap: update email address for Christopher Obbard kfence: skip __GFP_THISNODE allocations on NUMA systems nilfs2: fix possible int overflows in nilfs_fiemap() mm: compaction: use the proper flag to determine watermarks kernel: be more careful about dup_mmap() failures and uprobe registering mm/fake-numa: handle cases with no SRAT info mm: kmemleak: fix upper boundary check for physical address objects mailmap: add an entry for Hamza Mahfooz MAINTAINERS: mailmap: update Yosry Ahmed's email address scripts/gdb: fix aarch64 userspace detection in get_current_task mm/vmscan: accumulate nr_demoted for accurate demotion statistics ocfs2: fix incorrect CPU endianness conversion causing mount failure mm/zsmalloc: add __maybe_unused attribute for is_first_zpdesc() ...
2 parents c6fe03a + e5b2a35 commit 03cc357

34 files changed

+386
-448
lines changed

.mailmap

+6-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ Bryan Tan <[email protected]> <[email protected]>
150150
151151
152152
153-
153+
154+
155+
154156
155157
156158
@@ -167,6 +169,7 @@ Christian Brauner <[email protected]> <[email protected]>
167169
168170
Christian Marangi <[email protected]>
169171
Christophe Ricard <[email protected]>
172+
Christopher Obbard <[email protected]> <[email protected]>
170173
Christoph Hellwig <[email protected]>
171174
172175
@@ -263,6 +266,7 @@ Guo Ren <[email protected]> <[email protected]>
263266
Guru Das Srinagesh <[email protected]> <[email protected]>
264267
Gustavo Padovan <[email protected]>
265268
Gustavo Padovan <[email protected]>
269+
266270
267271
268272
@@ -763,6 +767,7 @@ Wolfram Sang <[email protected]> <[email protected]>
763767
764768
765769
770+
766771
Yusuke Goda <[email protected]>
767772
768773

Documentation/translations/sp_SP/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Traducción al español
77

88
\kerneldocCJKoff
99

10-
:maintainer: Carlos Bilbao <carlos.bilbao[email protected]>
10+
:maintainer: Carlos Bilbao <carlos.bilbao@kernel.org>
1111

1212
.. _sp_disclaimer:
1313

MAINTAINERS

+7-5
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ F: drivers/video/fbdev/geode/
10901090

10911091
AMD HSMP DRIVER
10921092
M: Naveen Krishna Chatradhi <[email protected]>
1093-
R: Carlos Bilbao <carlos.bilbao[email protected]>
1093+
R: Carlos Bilbao <carlos.bilbao@kernel.org>
10941094
10951095
S: Maintained
10961096
F: Documentation/arch/x86/amd_hsmp.rst
@@ -5857,7 +5857,7 @@ F: drivers/usb/atm/cxacru.c
58575857

58585858
CONFIDENTIAL COMPUTING THREAT MODEL FOR X86 VIRTUALIZATION (SNP/TDX)
58595859
M: Elena Reshetova <[email protected]>
5860-
M: Carlos Bilbao <carlos.bilbao[email protected]>
5860+
M: Carlos Bilbao <carlos.bilbao@kernel.org>
58615861
S: Maintained
58625862
F: Documentation/security/snp-tdx-threat-model.rst
58635863

@@ -11331,7 +11331,7 @@ S: Orphan
1133111331
F: drivers/video/fbdev/imsttfb.c
1133211332

1133311333
INDEX OF FURTHER KERNEL DOCUMENTATION
11334-
M: Carlos Bilbao <carlos.bilbao[email protected]>
11334+
M: Carlos Bilbao <carlos.bilbao@kernel.org>
1133511335
S: Maintained
1133611336
F: Documentation/process/kernel-docs.rst
1133711337

@@ -22215,7 +22215,7 @@ Q: http://patchwork.linuxtv.org/project/linux-media/list/
2221522215
F: drivers/media/dvb-frontends/sp2*
2221622216

2221722217
SPANISH DOCUMENTATION
22218-
M: Carlos Bilbao <carlos.bilbao[email protected]>
22218+
M: Carlos Bilbao <carlos.bilbao@kernel.org>
2221922219
R: Avadhut Naik <[email protected]>
2222022220
S: Maintained
2222122221
F: Documentation/translations/sp_SP/
@@ -25739,11 +25739,13 @@ F: arch/x86/entry/vdso/
2573925739
XARRAY
2574025740
M: Matthew Wilcox <[email protected]>
2574125741
25742+
2574225743
S: Supported
2574325744
F: Documentation/core-api/xarray.rst
2574425745
F: include/linux/idr.h
2574525746
F: include/linux/xarray.h
2574625747
F: lib/idr.c
25748+
F: lib/test_xarray.c
2574725749
F: lib/xarray.c
2574825750
F: tools/testing/radix-tree
2574925751

@@ -26223,7 +26225,7 @@ K: zstd
2622326225

2622426226
ZSWAP COMPRESSED SWAP CACHING
2622526227
M: Johannes Weiner <[email protected]>
26226-
M: Yosry Ahmed <[email protected]>
26228+
M: Yosry Ahmed <[email protected]>
2622726229
M: Nhat Pham <[email protected]>
2622826230
R: Chengming Zhou <[email protected]>
2622926231

arch/m68k/configs/amiga_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ CONFIG_TEST_PRINTF=m
626626
CONFIG_TEST_SCANF=m
627627
CONFIG_TEST_BITMAP=m
628628
CONFIG_TEST_UUID=m
629+
CONFIG_TEST_XARRAY=m
629630
CONFIG_TEST_MAPLE_TREE=m
630631
CONFIG_TEST_RHASHTABLE=m
631632
CONFIG_TEST_IDA=m

arch/m68k/configs/apollo_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ CONFIG_TEST_PRINTF=m
583583
CONFIG_TEST_SCANF=m
584584
CONFIG_TEST_BITMAP=m
585585
CONFIG_TEST_UUID=m
586+
CONFIG_TEST_XARRAY=m
586587
CONFIG_TEST_MAPLE_TREE=m
587588
CONFIG_TEST_RHASHTABLE=m
588589
CONFIG_TEST_IDA=m

arch/m68k/configs/atari_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ CONFIG_TEST_PRINTF=m
603603
CONFIG_TEST_SCANF=m
604604
CONFIG_TEST_BITMAP=m
605605
CONFIG_TEST_UUID=m
606+
CONFIG_TEST_XARRAY=m
606607
CONFIG_TEST_MAPLE_TREE=m
607608
CONFIG_TEST_RHASHTABLE=m
608609
CONFIG_TEST_IDA=m

arch/m68k/configs/bvme6000_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ CONFIG_TEST_PRINTF=m
575575
CONFIG_TEST_SCANF=m
576576
CONFIG_TEST_BITMAP=m
577577
CONFIG_TEST_UUID=m
578+
CONFIG_TEST_XARRAY=m
578579
CONFIG_TEST_MAPLE_TREE=m
579580
CONFIG_TEST_RHASHTABLE=m
580581
CONFIG_TEST_IDA=m

arch/m68k/configs/hp300_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ CONFIG_TEST_PRINTF=m
585585
CONFIG_TEST_SCANF=m
586586
CONFIG_TEST_BITMAP=m
587587
CONFIG_TEST_UUID=m
588+
CONFIG_TEST_XARRAY=m
588589
CONFIG_TEST_MAPLE_TREE=m
589590
CONFIG_TEST_RHASHTABLE=m
590591
CONFIG_TEST_IDA=m

arch/m68k/configs/mac_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ CONFIG_TEST_PRINTF=m
602602
CONFIG_TEST_SCANF=m
603603
CONFIG_TEST_BITMAP=m
604604
CONFIG_TEST_UUID=m
605+
CONFIG_TEST_XARRAY=m
605606
CONFIG_TEST_MAPLE_TREE=m
606607
CONFIG_TEST_RHASHTABLE=m
607608
CONFIG_TEST_IDA=m

arch/m68k/configs/multi_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ CONFIG_TEST_PRINTF=m
689689
CONFIG_TEST_SCANF=m
690690
CONFIG_TEST_BITMAP=m
691691
CONFIG_TEST_UUID=m
692+
CONFIG_TEST_XARRAY=m
692693
CONFIG_TEST_MAPLE_TREE=m
693694
CONFIG_TEST_RHASHTABLE=m
694695
CONFIG_TEST_IDA=m

arch/m68k/configs/mvme147_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ CONFIG_TEST_PRINTF=m
575575
CONFIG_TEST_SCANF=m
576576
CONFIG_TEST_BITMAP=m
577577
CONFIG_TEST_UUID=m
578+
CONFIG_TEST_XARRAY=m
578579
CONFIG_TEST_MAPLE_TREE=m
579580
CONFIG_TEST_RHASHTABLE=m
580581
CONFIG_TEST_IDA=m

arch/m68k/configs/mvme16x_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ CONFIG_TEST_PRINTF=m
576576
CONFIG_TEST_SCANF=m
577577
CONFIG_TEST_BITMAP=m
578578
CONFIG_TEST_UUID=m
579+
CONFIG_TEST_XARRAY=m
579580
CONFIG_TEST_MAPLE_TREE=m
580581
CONFIG_TEST_RHASHTABLE=m
581582
CONFIG_TEST_IDA=m

arch/m68k/configs/q40_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ CONFIG_TEST_PRINTF=m
592592
CONFIG_TEST_SCANF=m
593593
CONFIG_TEST_BITMAP=m
594594
CONFIG_TEST_UUID=m
595+
CONFIG_TEST_XARRAY=m
595596
CONFIG_TEST_MAPLE_TREE=m
596597
CONFIG_TEST_RHASHTABLE=m
597598
CONFIG_TEST_IDA=m

arch/m68k/configs/sun3_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ CONFIG_TEST_PRINTF=m
572572
CONFIG_TEST_SCANF=m
573573
CONFIG_TEST_BITMAP=m
574574
CONFIG_TEST_UUID=m
575+
CONFIG_TEST_XARRAY=m
575576
CONFIG_TEST_MAPLE_TREE=m
576577
CONFIG_TEST_RHASHTABLE=m
577578
CONFIG_TEST_IDA=m

arch/m68k/configs/sun3x_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ CONFIG_TEST_PRINTF=m
573573
CONFIG_TEST_SCANF=m
574574
CONFIG_TEST_BITMAP=m
575575
CONFIG_TEST_UUID=m
576+
CONFIG_TEST_XARRAY=m
576577
CONFIG_TEST_MAPLE_TREE=m
577578
CONFIG_TEST_RHASHTABLE=m
578579
CONFIG_TEST_IDA=m

arch/powerpc/configs/ppc64_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ CONFIG_TEST_PRINTF=m
448448
CONFIG_TEST_SCANF=m
449449
CONFIG_TEST_BITMAP=m
450450
CONFIG_TEST_UUID=m
451+
CONFIG_TEST_XARRAY=m
451452
CONFIG_TEST_MAPLE_TREE=m
452453
CONFIG_TEST_RHASHTABLE=m
453454
CONFIG_TEST_IDA=m

drivers/acpi/numa/srat.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,13 @@ int __init fix_pxm_node_maps(int max_nid)
9595
int i, j, index = -1, count = 0;
9696
nodemask_t nodes_to_enable;
9797

98-
if (numa_off || srat_disabled())
98+
if (numa_off)
9999
return -1;
100100

101+
/* no or incomplete node/PXM mapping set, nothing to do */
102+
if (srat_disabled())
103+
return 0;
104+
101105
/* find fake nodes PXM mapping */
102106
for (i = 0; i < MAX_NUMNODES; i++) {
103107
if (node_to_pxm_map[i] != PXM_INVAL) {
@@ -117,6 +121,11 @@ int __init fix_pxm_node_maps(int max_nid)
117121
}
118122
}
119123
}
124+
if (index == -1) {
125+
pr_debug("No node/PXM mapping has been set\n");
126+
/* nothing more to be done */
127+
return 0;
128+
}
120129
if (WARN(index != max_nid, "%d max nid when expected %d\n",
121130
index, max_nid))
122131
return -1;

fs/nilfs2/inode.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ int nilfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
11861186
if (size) {
11871187
if (phys && blkphy << blkbits == phys + size) {
11881188
/* The current extent goes on */
1189-
size += n << blkbits;
1189+
size += (u64)n << blkbits;
11901190
} else {
11911191
/* Terminate the current extent */
11921192
ret = fiemap_fill_next_extent(
@@ -1199,14 +1199,14 @@ int nilfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
11991199
flags = FIEMAP_EXTENT_MERGED;
12001200
logical = blkoff << blkbits;
12011201
phys = blkphy << blkbits;
1202-
size = n << blkbits;
1202+
size = (u64)n << blkbits;
12031203
}
12041204
} else {
12051205
/* Start a new extent */
12061206
flags = FIEMAP_EXTENT_MERGED;
12071207
logical = blkoff << blkbits;
12081208
phys = blkphy << blkbits;
1209-
size = n << blkbits;
1209+
size = (u64)n << blkbits;
12101210
}
12111211
blkoff += n;
12121212
}

fs/ocfs2/super.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di,
22852285
mlog(ML_ERROR, "found superblock with incorrect block "
22862286
"size bits: found %u, should be 9, 10, 11, or 12\n",
22872287
blksz_bits);
2288-
} else if ((1 << le32_to_cpu(blksz_bits)) != blksz) {
2288+
} else if ((1 << blksz_bits) != blksz) {
22892289
mlog(ML_ERROR, "found superblock with incorrect block "
22902290
"size: found %u, should be %u\n", 1 << blksz_bits, blksz);
22912291
} else if (le16_to_cpu(di->id2.i_super.s_major_rev_level) !=

include/linux/swap.h

+1
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ enum {
222222
};
223223

224224
#define SWAP_CLUSTER_MAX 32UL
225+
#define SWAP_CLUSTER_MAX_SKIPPED (SWAP_CLUSTER_MAX << 10)
225226
#define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX
226227

227228
/* Bit flag in swap_map */

kernel/events/uprobes.c

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <linux/rcupdate_trace.h>
2929
#include <linux/workqueue.h>
3030
#include <linux/srcu.h>
31+
#include <linux/oom.h> /* check_stable_address_space */
3132

3233
#include <linux/uprobes.h>
3334

@@ -1260,6 +1261,9 @@ register_for_each_vma(struct uprobe *uprobe, struct uprobe_consumer *new)
12601261
* returns NULL in find_active_uprobe_rcu().
12611262
*/
12621263
mmap_write_lock(mm);
1264+
if (check_stable_address_space(mm))
1265+
goto unlock;
1266+
12631267
vma = find_vma(mm, info->vaddr);
12641268
if (!vma || !valid_vma(vma, is_register) ||
12651269
file_inode(vma->vm_file) != uprobe->inode)

kernel/fork.c

+14-3
Original file line numberDiff line numberDiff line change
@@ -760,16 +760,27 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
760760
mt_set_in_rcu(vmi.mas.tree);
761761
ksm_fork(mm, oldmm);
762762
khugepaged_fork(mm, oldmm);
763-
} else if (mpnt) {
763+
} else {
764+
764765
/*
765766
* The entire maple tree has already been duplicated. If the
766767
* mmap duplication fails, mark the failure point with
767768
* XA_ZERO_ENTRY. In exit_mmap(), if this marker is encountered,
768769
* stop releasing VMAs that have not been duplicated after this
769770
* point.
770771
*/
771-
mas_set_range(&vmi.mas, mpnt->vm_start, mpnt->vm_end - 1);
772-
mas_store(&vmi.mas, XA_ZERO_ENTRY);
772+
if (mpnt) {
773+
mas_set_range(&vmi.mas, mpnt->vm_start, mpnt->vm_end - 1);
774+
mas_store(&vmi.mas, XA_ZERO_ENTRY);
775+
/* Avoid OOM iterating a broken tree */
776+
set_bit(MMF_OOM_SKIP, &mm->flags);
777+
}
778+
/*
779+
* The mm_struct is going to exit, but the locks will be dropped
780+
* first. Set the mm_struct as unstable is advisable as it is
781+
* not fully initialised.
782+
*/
783+
set_bit(MMF_UNSTABLE, &mm->flags);
773784
}
774785
out:
775786
mmap_write_unlock(mm);

lib/Kconfig.debug

+2-16
Original file line numberDiff line numberDiff line change
@@ -2456,22 +2456,8 @@ config TEST_BITMAP
24562456
config TEST_UUID
24572457
tristate "Test functions located in the uuid module at runtime"
24582458

2459-
config XARRAY_KUNIT
2460-
tristate "KUnit test XArray code at runtime" if !KUNIT_ALL_TESTS
2461-
depends on KUNIT
2462-
default KUNIT_ALL_TESTS
2463-
help
2464-
Enable this option to test the Xarray code at boot.
2465-
2466-
KUnit tests run during boot and output the results to the debug log
2467-
in TAP format (http://testanything.org/). Only useful for kernel devs
2468-
running the KUnit test harness, and not intended for inclusion into a
2469-
production build.
2470-
2471-
For more information on KUnit and unit tests in general please refer
2472-
to the KUnit documentation in Documentation/dev-tools/kunit/.
2473-
2474-
If unsure, say N.
2459+
config TEST_XARRAY
2460+
tristate "Test the XArray code at runtime"
24752461

24762462
config TEST_MAPLE_TREE
24772463
tristate "Test the Maple Tree code at runtime or module load"

lib/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ GCOV_PROFILE_test_bitmap.o := n
9494
endif
9595

9696
obj-$(CONFIG_TEST_UUID) += test_uuid.o
97+
obj-$(CONFIG_TEST_XARRAY) += test_xarray.o
9798
obj-$(CONFIG_TEST_MAPLE_TREE) += test_maple_tree.o
9899
obj-$(CONFIG_TEST_PARMAN) += test_parman.o
99100
obj-$(CONFIG_TEST_KMOD) += test_kmod.o
@@ -372,7 +373,6 @@ CFLAGS_bitfield_kunit.o := $(DISABLE_STRUCTLEAK_PLUGIN)
372373
obj-$(CONFIG_BITFIELD_KUNIT) += bitfield_kunit.o
373374
obj-$(CONFIG_CHECKSUM_KUNIT) += checksum_kunit.o
374375
obj-$(CONFIG_UTIL_MACROS_KUNIT) += util_macros_kunit.o
375-
obj-$(CONFIG_XARRAY_KUNIT) += test_xarray.o
376376
obj-$(CONFIG_LIST_KUNIT_TEST) += list-test.o
377377
obj-$(CONFIG_HASHTABLE_KUNIT_TEST) += hashtable_test.o
378378
obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o

0 commit comments

Comments
 (0)