* [merged mm-nonmm-stable] relay-fix-type-mismatch-when-allocating-memory-in-relay_create_buf.patch removed from -mm tree
@ 2022-12-12 3:31 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-12-12 3:31 UTC (permalink / raw)
To: mm-commits, wuchi.zero, colin.i.king, axboe, Ilia.Gavrilov, akpm
The quilt patch titled
Subject: relay: fix type mismatch when allocating memory in relay_create_buf()
has been removed from the -mm tree. Its filename was
relay-fix-type-mismatch-when-allocating-memory-in-relay_create_buf.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Gavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Subject: relay: fix type mismatch when allocating memory in relay_create_buf()
Date: Tue, 29 Nov 2022 09:23:38 +0000
The 'padding' field of the 'rchan_buf' structure is an array of 'size_t'
elements, but the memory is allocated for an array of 'size_t *' elements.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Link: https://lkml.kernel.org/r/20221129092002.3538384-1-Ilia.Gavrilov@infotecs.ru
Fixes: b86ff981a825 ("[PATCH] relay: migrate from relayfs to a generic relay API")
Signed-off-by: Ilia.Gavrilov <Ilia.Gavrilov@infotecs.ru>
Cc: Colin Ian King <colin.i.king@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: wuchi <wuchi.zero@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/relay.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/relay.c~relay-fix-type-mismatch-when-allocating-memory-in-relay_create_buf
+++ a/kernel/relay.c
@@ -148,13 +148,13 @@ static struct rchan_buf *relay_create_bu
{
struct rchan_buf *buf;
- if (chan->n_subbufs > KMALLOC_MAX_SIZE / sizeof(size_t *))
+ if (chan->n_subbufs > KMALLOC_MAX_SIZE / sizeof(size_t))
return NULL;
buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
if (!buf)
return NULL;
- buf->padding = kmalloc_array(chan->n_subbufs, sizeof(size_t *),
+ buf->padding = kmalloc_array(chan->n_subbufs, sizeof(size_t),
GFP_KERNEL);
if (!buf->padding)
goto free_buf;
_
Patches currently in -mm which might be from Ilia.Gavrilov@infotecs.ru are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-12 3:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-12 3:31 [merged mm-nonmm-stable] relay-fix-type-mismatch-when-allocating-memory-in-relay_create_buf.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.