This is a note to let you know that I've just added the patch titled io_uring/io-wq: free worker if task_work creation is canceled to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: io_uring-io-wq-free-worker-if-task_work-creation-is-canceled.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From af82425c6a2d2f347c79b63ce74fca6dc6be157f Mon Sep 17 00:00:00 2001 From: Jens Axboe <axboe@xxxxxxxxx> Date: Mon, 2 Jan 2023 16:49:46 -0700 Subject: io_uring/io-wq: free worker if task_work creation is canceled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Jens Axboe <axboe@xxxxxxxxx> commit af82425c6a2d2f347c79b63ce74fca6dc6be157f upstream. If we cancel the task_work, the worker will never come into existance. As this is the last reference to it, ensure that we get it freed appropriately. Cc: stable@xxxxxxxxxxxxxxx Reported-by: 진호 <wnwlsgh98@xxxxxxxxx> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- io_uring/io-wq.c | 1 + 1 file changed, 1 insertion(+) --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -1217,6 +1217,7 @@ static void io_wq_cancel_tw_create(struc worker = container_of(cb, struct io_worker, create_work); io_worker_cancel_cb(worker); + kfree(worker); } } Patches currently in stable-queue which might be from axboe@xxxxxxxxx are queue-5.10/nvme-pci-fix-mempool-alloc-size.patch queue-5.10/pata_ipx4xx_cf-fix-unsigned-comparison-with-less-tha.patch queue-5.10/blk-mq-fix-possible-memleak-when-register-hctx-faile.patch queue-5.10/arm-renumber-bits-related-to-_tif_work_mask.patch queue-5.10/blktrace-fix-output-non-blktrace-event-when-blk_clas.patch queue-5.10/relay-fix-type-mismatch-when-allocating-memory-in-re.patch queue-5.10/drbd-fix-an-invalid-memory-access-caused-by-incorrec.patch queue-5.10/eventfd-change-int-to-__u64-in-eventfd_signal-ifndef.patch queue-5.10/io_uring-io-wq-free-worker-if-task_work-creation-is-canceled.patch