diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-01-03 00:49:46 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-01-03 00:49:46 +0100 |
commit | af82425c6a2d2f347c79b63ce74fca6dc6be157f (patch) | |
tree | d825904ffb32c416167ba6523a4668ec28bf03f9 /io_uring | |
parent | uapi:io_uring.h: allow linux/time_types.h to be skipped (diff) | |
download | linux-af82425c6a2d2f347c79b63ce74fca6dc6be157f.tar.xz linux-af82425c6a2d2f347c79b63ce74fca6dc6be157f.zip |
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: 진호 <wnwlsgh98@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
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 6f1d0e5df23a..992dcd9f8c4c 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -1230,6 +1230,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); } } |