io_uring/io-wq: free worker if task_work creation is canceled
authorJens Axboe <axboe@kernel.dk>
Mon, 2 Jan 2023 23:49:46 +0000 (16:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:33 +0000 (11:58 +0100)
commit0a14c3ded80c7dd399e68f361ee3338b5271c98e
tree0a67ce69ac768b27caa577876aefd59c435c9a97
parent3925336af00f79fb7f3a390b6ab30d455d32d863
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>
io_uring/io-wq.c