mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
io_uring: fix task leak issue in io_wq_create()
commit89465d923bupstream. Add missing put_task_struct() in the error path Cc: stable@vger.kernel.org Fixes:0f8baa3c98("io-wq: fully initialize wqe before calling cpuhp_state_add_instance_nocalls()") Signed-off-by: Penglei Jiang <superman.xpt@gmail.com> Link: https://lore.kernel.org/r/20250615163906.2367-1-superman.xpt@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0e23ac818f
commit
3b1fedf02d
@@ -1236,8 +1236,10 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
|
||||
atomic_set(&wq->worker_refs, 1);
|
||||
init_completion(&wq->worker_done);
|
||||
ret = cpuhp_state_add_instance_nocalls(io_wq_online, &wq->cpuhp_node);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
put_task_struct(wq->task);
|
||||
goto err;
|
||||
}
|
||||
|
||||
return wq;
|
||||
err:
|
||||
|
||||
Reference in New Issue
Block a user