Skip to content

Commit af82425

Browse files
committed
io_uring/io-wq: free worker if task_work creation is canceled
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: [email protected] Reported-by: 진호 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 9eb8034 commit af82425

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

io_uring/io-wq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ static void io_wq_cancel_tw_create(struct io_wq *wq)
12301230

12311231
worker = container_of(cb, struct io_worker, create_work);
12321232
io_worker_cancel_cb(worker);
1233+
kfree(worker);
12331234
}
12341235
}
12351236

0 commit comments

Comments
 (0)