* [merged mm-hotfixes-stable] mm-shrinker-use-kvzalloc_node-from-expand_one_shrinker_info.patch removed from -mm tree
@ 2024-01-05 17:59 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-01-05 17:59 UTC (permalink / raw)
To: mm-commits, zhengqi.arch, syzbot+1e0ed05798af62917464,
songmuchun, penguin-kernel, akpm
The quilt patch titled
Subject: mm: shrinker: use kvzalloc_node() from expand_one_shrinker_info()
has been removed from the -mm tree. Its filename was
mm-shrinker-use-kvzalloc_node-from-expand_one_shrinker_info.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Subject: mm: shrinker: use kvzalloc_node() from expand_one_shrinker_info()
Date: Wed, 3 Jan 2024 10:52:22 +0900
syzbot is reporting uninit-value at shrinker_alloc(), for commit
307bececcd12 ("mm: shrinker: add a secondary array for
shrinker_info::{map, nr_deferred}") which assumed that the ->unit was
allocated with __GFP_ZERO forgot to replace kvmalloc_node() in
expand_one_shrinker_info() with kvzalloc_node().
Link: https://lkml.kernel.org/r/9226cc0a-10e0-4489-80c5-58c3b5b4359c@I-love.SAKURA.ne.jp
Reported-by: syzbot <syzbot+1e0ed05798af62917464@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=1e0ed05798af62917464
Fixes: 307bececcd12 ("mm: shrinker: add a secondary array for shrinker_info::{map, nr_deferred}")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/shrinker.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/shrinker.c~mm-shrinker-use-kvzalloc_node-from-expand_one_shrinker_info
+++ a/mm/shrinker.c
@@ -126,7 +126,7 @@ static int expand_one_shrinker_info(stru
if (new_nr_max <= old->map_nr_max)
continue;
- new = kvmalloc_node(sizeof(*new) + new_size, GFP_KERNEL, nid);
+ new = kvzalloc_node(sizeof(*new) + new_size, GFP_KERNEL, nid);
if (!new)
return -ENOMEM;
_
Patches currently in -mm which might be from penguin-kernel@I-love.SAKURA.ne.jp are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-05 17:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-05 17:59 [merged mm-hotfixes-stable] mm-shrinker-use-kvzalloc_node-from-expand_one_shrinker_info.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.