* [PATCH] io_uring: fix task leak issue in io_wq_create()
@ 2025-06-15 16:39 Penglei Jiang
2025-06-15 18:59 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Penglei Jiang @ 2025-06-15 16:39 UTC (permalink / raw)
To: axboe; +Cc: io-uring, linux-kernel, Penglei Jiang
Add missing put_task_struct() in the error path
Fixes: 0f8baa3c9802 ("io-wq: fully initialize wqe before calling cpuhp_state_add_instance_nocalls()")
Signed-off-by: Penglei Jiang <superman.xpt@gmail.com>
---
io_uring/io-wq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c
index cd1fcb115739..be91edf34f01 100644
--- a/io_uring/io-wq.c
+++ b/io_uring/io-wq.c
@@ -1259,8 +1259,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:
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] io_uring: fix task leak issue in io_wq_create()
2025-06-15 16:39 [PATCH] io_uring: fix task leak issue in io_wq_create() Penglei Jiang
@ 2025-06-15 18:59 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2025-06-15 18:59 UTC (permalink / raw)
To: Penglei Jiang; +Cc: io-uring, linux-kernel
On Sun, 15 Jun 2025 09:39:06 -0700, Penglei Jiang wrote:
> Add missing put_task_struct() in the error path
>
>
Applied, thanks!
[1/1] io_uring: fix task leak issue in io_wq_create()
commit: 89465d923bda180299e69ee2800aab84ad0ba689
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-15 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-15 16:39 [PATCH] io_uring: fix task leak issue in io_wq_create() Penglei Jiang
2025-06-15 18:59 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox