From: Chen Jun <chenjun102@huawei.com>
To: <cl@linux.com>, <penberg@kernel.org>, <rientjes@google.com>,
<iamjoonsoo.kim@lge.com>, <akpm@linux-foundation.org>,
<vbabka@suse.cz>, <roman.gushchin@linux.dev>,
<42.hyeyoo@gmail.com>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>
Cc: <xuqiang36@huawei.com>
Subject: [PATCH] mm, slub: fix uninitialized variable in __slab_free
Date: Fri, 16 Dec 2022 03:31:19 +0000 [thread overview]
Message-ID: <20221216033119.14159-1-chenjun102@huawei.com> (raw)
new.frozen is not initialized before it is used.
Fixes: 2cfb7455d223 ("slub: Rework allocator fastpaths")
Signed-off-by: Chen Jun <chenjun102@huawei.com>
---
mm/slub.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/slub.c b/mm/slub.c
index 13459c69095a..8628c88875b6 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3593,6 +3593,7 @@ static void __slab_free(struct kmem_cache *s, struct slab *slab,
return;
}
+ new.frozen = 0;
do {
if (unlikely(n)) {
spin_unlock_irqrestore(&n->list_lock, flags);
--
2.17.1
next reply other threads:[~2022-12-16 3:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 3:31 Chen Jun [this message]
2022-12-16 7:42 ` Hyeonggon Yoo
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=20221216033119.14159-1-chenjun102@huawei.com \
--to=chenjun102@huawei.com \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=vbabka@suse.cz \
--cc=xuqiang36@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox