Skip to content

Commit 2b4d021

Browse files
committed
Merge tag 'mm-hotfixes-stable-2026-04-30-15-39' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull MM fixes from Andrew Morton: "20 hotfixes. All are for MM (and for MMish maintainers). 9 are cc:stable and the remainder are for post-7.0 issues or aren't deemed suitable for backporting. There are two DAMON series from SeongJae Park which address races which could lead to use-after-free errors, and avoid the possibility of presenting stale parameter values to users" * tag 'mm-hotfixes-stable-2026-04-30-15-39' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm: memcontrol: fix rcu unbalance in get_non_dying_memcg_end() mm/userfaultfd: detect VMA type change after copy retry in mfill_copy_folio_retry() MAINTAINERS: remove stale kdump project URL mm/damon/stat: detect and use fresh enabled value mm/damon/lru_sort: detect and use fresh enabled and kdamond_pid values mm/damon/reclaim: detect and use fresh enabled and kdamond_pid values selftests/mm: specify requirement for PROC_MEM_ALWAYS_FORCE=y mm/damon/sysfs-schemes: protect path kfree() with damon_sysfs_lock mm/damon/sysfs-schemes: protect memcg_path kfree() with damon_sysfs_lock MAINTAINERS: update Li Wang's email address MAINTAINERS, mailmap: update email address for Qi Zheng MAINTAINERS: update Liam's email address mm/hugetlb_cma: round up per_node before logging it MAINTAINERS: fix regex pattern in CORE MM category mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap() mm: start background writeback based on per-wb threshold for strictlimit BDIs kho: fix error handling in kho_add_subtree() liveupdate: fix return value on session allocation failure mailmap: update entry for Dan Carpenter vmalloc: fix buffer overflow in vrealloc_node_align()
2 parents 26fd6bf + 99ebc50 commit 2b4d021

23 files changed

Lines changed: 262 additions & 140 deletions

File tree

.mailmap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ Claudiu Beznea <claudiu.beznea@tuxon.dev> <claudiu.beznea@microchip.com>
207207
Colin Ian King <colin.i.king@gmail.com> <colin.king@canonical.com>
208208
Corey Minyard <minyard@acm.org>
209209
Damian Hobson-Garcia <dhobsong@igel.co.jp>
210+
Dan Carpenter <error27@gmail.com> <dan.carpenter@linaro.org>
210211
Dan Carpenter <error27@gmail.com> <dan.carpenter@oracle.com>
211212
Dan Williams <djbw@kernel.org> <dan.j.williams@intel.com>
212213
Daniel Borkmann <daniel@iogearbox.net> <danborkmann@googlemail.com>
@@ -495,6 +496,7 @@ Leon Romanovsky <leon@kernel.org> <leon@leon.nu>
495496
Leon Romanovsky <leon@kernel.org> <leonro@mellanox.com>
496497
Leon Romanovsky <leon@kernel.org> <leonro@nvidia.com>
497498
Leo Yan <leo.yan@linux.dev> <leo.yan@linaro.org>
499+
Liam R. Howlett <liam@infradead.org> <Liam.Howlett@oracle.com>
498500
Liam Mark <quic_lmark@quicinc.com> <lmark@codeaurora.org>
499501
Linas Vepstas <linas@austin.ibm.com>
500502
Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@ascom.ch>
@@ -505,6 +507,8 @@ Linus Walleij <linusw@kernel.org> <linus.walleij@stericsson.com>
505507
Linus Walleij <linusw@kernel.org> <linus.walleij@linaro.org>
506508
Linus Walleij <linusw@kernel.org> <triad@df.lth.se>
507509
<linux-hardening@vger.kernel.org> <kernel-hardening@lists.openwall.com>
510+
Li Wang <li.wang@linux.dev> <liwang@redhat.com>
511+
Li Wang <li.wang@linux.dev> <wangli.ahau@gmail.com>
508512
Li Yang <leoyang.li@nxp.com> <leoli@freescale.com>
509513
Li Yang <leoyang.li@nxp.com> <leo@zh-kernel.org>
510514
Lior David <quic_liord@quicinc.com> <liord@codeaurora.org>
@@ -687,6 +691,7 @@ Punit Agrawal <punitagrawal@gmail.com> <punit.agrawal@arm.com>
687691
Puranjay Mohan <puranjay@kernel.org> <puranjay12@gmail.com>
688692
Qais Yousef <qyousef@layalina.io> <qais.yousef@imgtec.com>
689693
Qais Yousef <qyousef@layalina.io> <qais.yousef@arm.com>
694+
Qi Zheng <qi.zheng@linux.dev> <zhengqi.arch@bytedance.com>
690695
Quentin Monnet <qmo@kernel.org> <quentin.monnet@netronome.com>
691696
Quentin Monnet <qmo@kernel.org> <quentin@isovalent.com>
692697
Quentin Perret <qperret@qperret.net> <quentin.perret@arm.com>

MAINTAINERS

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13860,7 +13860,6 @@ M: Pratyush Yadav <pratyush@kernel.org>
1386013860
R: Dave Young <ruirui.yang@linux.dev>
1386113861
L: kexec@lists.infradead.org
1386213862
S: Maintained
13863-
W: http://lse.sourceforge.net/kdump/
1386413863
F: Documentation/admin-guide/kdump/
1386513864
F: fs/proc/vmcore.c
1386613865
F: include/linux/crash_core.h
@@ -15252,7 +15251,7 @@ M: Andrea Cervesato <andrea.cervesato@suse.com>
1525215251
M: Cyril Hrubis <chrubis@suse.cz>
1525315252
M: Jan Stancek <jstancek@redhat.com>
1525415253
M: Petr Vorel <pvorel@suse.cz>
15255-
M: Li Wang <liwang@redhat.com>
15254+
M: Li Wang <li.wang@linux.dev>
1525615255
M: Yang Xu <xuyang2018.jy@fujitsu.com>
1525715256
M: Xiao Yang <yangx.jy@fujitsu.com>
1525815257
L: ltp@lists.linux.it (subscribers-only)
@@ -15399,7 +15398,7 @@ F: include/net/netns/mctp.h
1539915398
F: net/mctp/
1540015399

1540115400
MAPLE TREE
15402-
M: Liam R. Howlett <Liam.Howlett@oracle.com>
15401+
M: Liam R. Howlett <liam@infradead.org>
1540315402
R: Alice Ryhl <aliceryhl@google.com>
1540415403
R: Andrew Ballance <andrewjballance@gmail.com>
1540515404
L: maple-tree@lists.infradead.org
@@ -16759,7 +16758,7 @@ MEMORY MANAGEMENT - CORE
1675916758
M: Andrew Morton <akpm@linux-foundation.org>
1676016759
M: David Hildenbrand <david@kernel.org>
1676116760
R: Lorenzo Stoakes <ljs@kernel.org>
16762-
R: Liam R. Howlett <Liam.Howlett@oracle.com>
16761+
R: Liam R. Howlett <liam@infradead.org>
1676316762
R: Vlastimil Babka <vbabka@kernel.org>
1676416763
R: Mike Rapoport <rppt@kernel.org>
1676516764
R: Suren Baghdasaryan <surenb@google.com>
@@ -16805,7 +16804,7 @@ F: mm/sparse.c
1680516804
F: mm/util.c
1680616805
F: mm/vmpressure.c
1680716806
F: mm/vmstat.c
16808-
N: include/linux/page[-_]*
16807+
N: include\/linux\/page[-_][a-zA-Z]*
1680916808

1681016809
MEMORY MANAGEMENT - EXECMEM
1681116810
M: Andrew Morton <akpm@linux-foundation.org>
@@ -16895,7 +16894,7 @@ MEMORY MANAGEMENT - MISC
1689516894
M: Andrew Morton <akpm@linux-foundation.org>
1689616895
M: David Hildenbrand <david@kernel.org>
1689716896
R: Lorenzo Stoakes <ljs@kernel.org>
16898-
R: Liam R. Howlett <Liam.Howlett@oracle.com>
16897+
R: Liam R. Howlett <liam@infradead.org>
1689916898
R: Vlastimil Babka <vbabka@kernel.org>
1690016899
R: Mike Rapoport <rppt@kernel.org>
1690116900
R: Suren Baghdasaryan <surenb@google.com>
@@ -16962,6 +16961,7 @@ S: Maintained
1696216961
F: include/linux/compaction.h
1696316962
F: include/linux/gfp.h
1696416963
F: include/linux/page-isolation.h
16964+
F: include/linux/pageblock-flags.h
1696516965
F: mm/compaction.c
1696616966
F: mm/debug_page_alloc.c
1696716967
F: mm/debug_page_ref.c
@@ -16983,7 +16983,7 @@ M: Andrew Morton <akpm@linux-foundation.org>
1698316983
M: Johannes Weiner <hannes@cmpxchg.org>
1698416984
R: David Hildenbrand <david@kernel.org>
1698516985
R: Michal Hocko <mhocko@kernel.org>
16986-
R: Qi Zheng <zhengqi.arch@bytedance.com>
16986+
R: Qi Zheng <qi.zheng@linux.dev>
1698716987
R: Shakeel Butt <shakeel.butt@linux.dev>
1698816988
R: Lorenzo Stoakes <ljs@kernel.org>
1698916989
L: linux-mm@kvack.org
@@ -16996,7 +16996,7 @@ M: Andrew Morton <akpm@linux-foundation.org>
1699616996
M: David Hildenbrand <david@kernel.org>
1699716997
M: Lorenzo Stoakes <ljs@kernel.org>
1699816998
R: Rik van Riel <riel@surriel.com>
16999-
R: Liam R. Howlett <Liam.Howlett@oracle.com>
16999+
R: Liam R. Howlett <liam@infradead.org>
1700017000
R: Vlastimil Babka <vbabka@kernel.org>
1700117001
R: Harry Yoo <harry@kernel.org>
1700217002
R: Jann Horn <jannh@google.com>
@@ -17043,7 +17043,7 @@ M: David Hildenbrand <david@kernel.org>
1704317043
M: Lorenzo Stoakes <ljs@kernel.org>
1704417044
R: Zi Yan <ziy@nvidia.com>
1704517045
R: Baolin Wang <baolin.wang@linux.alibaba.com>
17046-
R: Liam R. Howlett <Liam.Howlett@oracle.com>
17046+
R: Liam R. Howlett <liam@infradead.org>
1704717047
R: Nico Pache <npache@redhat.com>
1704817048
R: Ryan Roberts <ryan.roberts@arm.com>
1704917049
R: Dev Jain <dev.jain@arm.com>
@@ -17081,7 +17081,7 @@ F: tools/testing/selftests/mm/uffd-*.[ch]
1708117081
MEMORY MANAGEMENT - RUST
1708217082
M: Alice Ryhl <aliceryhl@google.com>
1708317083
R: Lorenzo Stoakes <ljs@kernel.org>
17084-
R: Liam R. Howlett <Liam.Howlett@oracle.com>
17084+
R: Liam R. Howlett <liam@infradead.org>
1708517085
L: linux-mm@kvack.org
1708617086
L: rust-for-linux@vger.kernel.org
1708717087
S: Maintained
@@ -17095,7 +17095,7 @@ F: rust/kernel/page.rs
1709517095

1709617096
MEMORY MAPPING
1709717097
M: Andrew Morton <akpm@linux-foundation.org>
17098-
M: Liam R. Howlett <Liam.Howlett@oracle.com>
17098+
M: Liam R. Howlett <liam@infradead.org>
1709917099
M: Lorenzo Stoakes <ljs@kernel.org>
1710017100
R: Vlastimil Babka <vbabka@kernel.org>
1710117101
R: Jann Horn <jannh@google.com>
@@ -17127,7 +17127,7 @@ F: tools/testing/vma/
1712717127
MEMORY MAPPING - LOCKING
1712817128
M: Andrew Morton <akpm@linux-foundation.org>
1712917129
M: Suren Baghdasaryan <surenb@google.com>
17130-
M: Liam R. Howlett <Liam.Howlett@oracle.com>
17130+
M: Liam R. Howlett <liam@infradead.org>
1713117131
M: Lorenzo Stoakes <ljs@kernel.org>
1713217132
R: Vlastimil Babka <vbabka@kernel.org>
1713317133
R: Shakeel Butt <shakeel.butt@linux.dev>
@@ -17142,7 +17142,7 @@ F: mm/mmap_lock.c
1714217142

1714317143
MEMORY MAPPING - MADVISE (MEMORY ADVICE)
1714417144
M: Andrew Morton <akpm@linux-foundation.org>
17145-
M: Liam R. Howlett <Liam.Howlett@oracle.com>
17145+
M: Liam R. Howlett <liam@infradead.org>
1714617146
M: Lorenzo Stoakes <ljs@kernel.org>
1714717147
M: David Hildenbrand <david@kernel.org>
1714817148
R: Vlastimil Babka <vbabka@kernel.org>
@@ -23403,7 +23403,7 @@ RUST [ALLOC]
2340323403
M: Danilo Krummrich <dakr@kernel.org>
2340423404
R: Lorenzo Stoakes <ljs@kernel.org>
2340523405
R: Vlastimil Babka <vbabka@kernel.org>
23406-
R: Liam R. Howlett <Liam.Howlett@oracle.com>
23406+
R: Liam R. Howlett <liam@infradead.org>
2340723407
R: Uladzislau Rezki <urezki@gmail.com>
2340823408
L: rust-for-linux@vger.kernel.org
2340923409
S: Maintained
@@ -24348,7 +24348,7 @@ F: include/media/i2c/rj54n1cb0c.h
2434824348
SHRINKER
2434924349
M: Andrew Morton <akpm@linux-foundation.org>
2435024350
M: Dave Chinner <david@fromorbit.com>
24351-
R: Qi Zheng <zhengqi.arch@bytedance.com>
24351+
R: Qi Zheng <qi.zheng@linux.dev>
2435224352
R: Roman Gushchin <roman.gushchin@linux.dev>
2435324353
R: Muchun Song <muchun.song@linux.dev>
2435424354
L: linux-mm@kvack.org

include/linux/maple_tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/*
55
* Maple Tree - An RCU-safe adaptive tree for storing ranges
66
* Copyright (c) 2018-2022 Oracle
7-
* Authors: Liam R. Howlett <Liam.Howlett@Oracle.com>
7+
* Authors: Liam R. Howlett <liam@infradead.org>
88
* Matthew Wilcox <willy@infradead.org>
99
*/
1010

include/linux/mm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4391,7 +4391,7 @@ static inline void mmap_action_map_kernel_pages_full(struct vm_area_desc *desc,
43914391

43924392
int mmap_action_prepare(struct vm_area_desc *desc);
43934393
int mmap_action_complete(struct vm_area_struct *vma,
4394-
struct mmap_action *action);
4394+
struct mmap_action *action, bool is_compat);
43954395

43964396
/* Look up the first VMA which exactly match the interval vm_start ... vm_end */
43974397
static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,

kernel/liveupdate/kexec_handover.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -762,19 +762,24 @@ int kho_add_subtree(const char *name, void *blob, size_t size)
762762
goto out_pack;
763763
}
764764

765-
err = fdt_setprop(root_fdt, off, KHO_SUB_TREE_PROP_NAME,
766-
&phys, sizeof(phys));
767-
if (err < 0)
768-
goto out_pack;
765+
fdt_err = fdt_setprop(root_fdt, off, KHO_SUB_TREE_PROP_NAME,
766+
&phys, sizeof(phys));
767+
if (fdt_err < 0)
768+
goto out_del_node;
769769

770-
err = fdt_setprop(root_fdt, off, KHO_SUB_TREE_SIZE_PROP_NAME,
771-
&size_u64, sizeof(size_u64));
772-
if (err < 0)
773-
goto out_pack;
770+
fdt_err = fdt_setprop(root_fdt, off, KHO_SUB_TREE_SIZE_PROP_NAME,
771+
&size_u64, sizeof(size_u64));
772+
if (fdt_err < 0)
773+
goto out_del_node;
774774

775775
WARN_ON_ONCE(kho_debugfs_blob_add(&kho_out.dbg, name, blob,
776776
size, false));
777777

778+
err = 0;
779+
goto out_pack;
780+
781+
out_del_node:
782+
fdt_del_node(root_fdt, off);
778783
out_pack:
779784
fdt_pack(root_fdt);
780785

kernel/liveupdate/luo_session.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,12 @@ int luo_session_deserialize(void)
514514
{
515515
struct luo_session_header *sh = &luo_session_global.incoming;
516516
static bool is_deserialized;
517-
static int err;
517+
static int saved_err;
518+
int err;
518519

519520
/* If has been deserialized, always return the same error code */
520521
if (is_deserialized)
521-
return err;
522+
return saved_err;
522523

523524
is_deserialized = true;
524525
if (!sh->active)
@@ -547,15 +548,16 @@ int luo_session_deserialize(void)
547548
pr_warn("Failed to allocate session [%.*s] during deserialization %pe\n",
548549
(int)sizeof(sh->ser[i].name),
549550
sh->ser[i].name, session);
550-
return PTR_ERR(session);
551+
err = PTR_ERR(session);
552+
goto save_err;
551553
}
552554

553555
err = luo_session_insert(sh, session);
554556
if (err) {
555557
pr_warn("Failed to insert session [%s] %pe\n",
556558
session->name, ERR_PTR(err));
557559
luo_session_free(session);
558-
return err;
560+
goto save_err;
559561
}
560562

561563
scoped_guard(mutex, &session->mutex) {
@@ -565,7 +567,7 @@ int luo_session_deserialize(void)
565567
if (err) {
566568
pr_warn("Failed to deserialize files for session [%s] %pe\n",
567569
session->name, ERR_PTR(err));
568-
return err;
570+
goto save_err;
569571
}
570572
}
571573

@@ -574,6 +576,9 @@ int luo_session_deserialize(void)
574576
sh->ser = NULL;
575577

576578
return 0;
579+
save_err:
580+
saved_err = err;
581+
return err;
577582
}
578583

579584
int luo_session_serialize(void)

lib/maple_tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* Maple Tree implementation
44
* Copyright (c) 2018-2022 Oracle Corporation
5-
* Authors: Liam R. Howlett <Liam.Howlett@oracle.com>
5+
* Authors: Liam R. Howlett <liam@infradead.org>
66
* Matthew Wilcox <willy@infradead.org>
77
* Copyright (c) 2023 ByteDance
88
* Author: Peng Zhang <zhangpeng.00@bytedance.com>

lib/test_maple_tree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* test_maple_tree.c: Test the maple tree API
44
* Copyright (c) 2018-2022 Oracle Corporation
5-
* Author: Liam R. Howlett <Liam.Howlett@Oracle.com>
5+
* Author: Liam R. Howlett <liam@infradead.org>
66
*
77
* Any tests that only require the interface of the tree.
88
*/
@@ -4021,6 +4021,6 @@ static void __exit maple_tree_harvest(void)
40214021

40224022
module_init(maple_tree_seed);
40234023
module_exit(maple_tree_harvest);
4024-
MODULE_AUTHOR("Liam R. Howlett <Liam.Howlett@Oracle.com>");
4024+
MODULE_AUTHOR("Liam R. Howlett <liam@infradead.org>");
40254025
MODULE_DESCRIPTION("maple tree API test module");
40264026
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)