From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,zhengqi.arch@bytedance.com,syzbot+1e0ed05798af62917464@syzkaller.appspotmail.com,songmuchun@bytedance.com,penguin-kernel@I-love.SAKURA.ne.jp,akpm@linux-foundation.org
Subject: + mm-shrinker-use-kvzalloc_node-from-memcg_expand_one_shrinker_map.patch added to mm-hotfixes-unstable branch
Date: Tue, 02 Jan 2024 09:58:46 -0800 [thread overview]
Message-ID: <20240102175847.AA94EC433C8@smtp.kernel.org> (raw)
The patch titled
Subject: mm: shrinker: use kvzalloc_node() from memcg_expand_one_shrinker_map()
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-shrinker-use-kvzalloc_node-from-memcg_expand_one_shrinker_map.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-shrinker-use-kvzalloc_node-from-memcg_expand_one_shrinker_map.patch
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Subject: mm: shrinker: use kvzalloc_node() from memcg_expand_one_shrinker_map()
Date: Wed, 3 Jan 2024 00:46:36 +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
memcg_expand_one_shrinker_map() with kvzalloc_node().
Link: https://lkml.kernel.org/r/b1a78c6a-b3fa-46ed-810a-ce546e726d44@I-love.SAKURA.ne.jp
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>
Reported-by: syzbot <syzbot+1e0ed05798af62917464@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=1e0ed05798af62917464
Cc: 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-memcg_expand_one_shrinker_map
+++ 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
mm-shrinker-use-kvzalloc_node-from-memcg_expand_one_shrinker_map.patch
next reply other threads:[~2024-01-02 17:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 17:58 Andrew Morton [this message]
2024-01-03 2:33 ` + mm-shrinker-use-kvzalloc_node-from-memcg_expand_one_shrinker_map.patch added to mm-hotfixes-unstable branch Qi Zheng
2024-01-03 2:46 ` Tetsuo Handa
2024-01-03 2:40 ` Qi Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240102175847.AA94EC433C8@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=mm-commits@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=songmuchun@bytedance.com \
--cc=syzbot+1e0ed05798af62917464@syzkaller.appspotmail.com \
--cc=zhengqi.arch@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.