]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: fix memory leak when cache init fail
authorGuixin Liu <kanie@linux.alibaba.com>
Mon, 23 Sep 2024 10:05:12 +0000 (18:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:03:02 +0000 (12:03 +0200)
commita3f7d79554f22feeab44bcdda95b29c902ab8498
tree4ad8a1d7c3aa9b3c1dd7c7e4cb65e10977a35b3f
parent004edfa7cd58fbd0183a7ea4f535bd7a7f401b2b
io_uring: fix memory leak when cache init fail

[ Upstream commit 3a87e264290d71ec86a210ab3e8d23b715ad266d ]

Exit the percpu ref when cache init fails to free the data memory with
in struct percpu_ref.

Fixes: 206aefde4f88 ("io_uring: reduce/pack size of io_ring_ctx")
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/20240923100512.64638-1-kanie@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
io_uring/io_uring.c