Commit af82425c authored by Jens Axboe's avatar Jens Axboe

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: stable@vger.kernel.org
Reported-by: default avatar진호 <wnwlsgh98@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9eb80340
...@@ -1230,6 +1230,7 @@ static void io_wq_cancel_tw_create(struct io_wq *wq) ...@@ -1230,6 +1230,7 @@ static void io_wq_cancel_tw_create(struct io_wq *wq)
worker = container_of(cb, struct io_worker, create_work); worker = container_of(cb, struct io_worker, create_work);
io_worker_cancel_cb(worker); io_worker_cancel_cb(worker);
kfree(worker);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment