kernel/io_uring: cancel io_uring before task works
For cancelling io_uring requests it needs either to be able to run
currently enqueued task_works or having it shut down by that moment.
Otherwise io_uring_cancel_files() may be waiting for requests that won't
Go with the first way and do cancellations before setting PF_EXITING and
so before putting the task_work infrastructure into a transition state
where task_work_run() would better not be called.
Cc: firstname.lastname@example.org # 5.5+
Signed-off-by: Pavel Begunkov <email@example.com>
Signed-off-by: Jens Axboe <firstname.lastname@example.org>
2 files changed