mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
io_uring/io-wq: free worker if task_work creation is canceled
commit af82425c6a
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>
This commit is contained in:
parent
68bcd06385
commit
b912ed1363
1 changed files with 1 additions and 0 deletions
|
@ -1217,6 +1217,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue