relay: fix type mismatch when allocating memory in relay_create_buf()
authorGavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Tue, 29 Nov 2022 09:23:38 +0000 (09:23 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 Dec 2022 03:30:19 +0000 (19:30 -0800)
commit4d8586e04602fe42f0a782d2005956f8b6302678
treeac2051b7ffde584efba33e9aa71baa2c66c56412
parentc9a934c7d88413a35861387a11e901554810b122
relay: fix type mismatch when allocating memory in relay_create_buf()

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