]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix __io_uring_files_cancel() with TASK_UNINTERRUPTIBLE
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 26 Jan 2021 15:28:26 +0000 (15:28 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Jan 2021 15:51:08 +0000 (08:51 -0700)
commitb2b8b776b9206e46175dc0a7c1fc0c961c46c925
tree7d5dc5a5fbf032bfd7fedc1179a1fd3ec4c6797e
parentdc72ae5e97ac34eb86ee423ca6f552b6aea25689
io_uring: fix __io_uring_files_cancel() with TASK_UNINTERRUPTIBLE

If the tctx inflight number haven't changed because of cancellation,
__io_uring_task_cancel() will continue leaving the task in
TASK_UNINTERRUPTIBLE state, that's not expected by
__io_uring_files_cancel(). Ensure we always call finish_wait() before
retrying.

Cc: stable@vger.kernel.org # 5.9+
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c