diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-01-02 16:49:46 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-18 11:45:01 +0100 |
commit | b912ed1363b363d587fe1aac9636ce9e9366a775 (patch) | |
tree | 411e08e1ef54c66e399599593b1906313e27cb55 /io_uring | |
parent | 68bcd063857075d2f9edfed6024387ac377923e2 (diff) |
io_uring/io-wq: free worker if task_work creation is canceled
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@vger.kernel.org
Reported-by: 진호 <wnwlsgh98@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io-wq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index 6031fb319d87..81b5e4462dba 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -1217,6 +1217,7 @@ static void io_wq_cancel_tw_create(struct io_wq *wq) worker = container_of(cb, struct io_worker, create_work); io_worker_cancel_cb(worker); + kfree(worker); } } |