io_uring: iopoll requests should also wake task ->in_idle state
authorJens Axboe <axboe@kernel.dk>
Sat, 16 Jan 2021 18:52:11 +0000 (11:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2021 10:55:15 +0000 (11:55 +0100)
commitca75872dd9f3db7893113b8fca6f2c874a4cbccf
treeb712fdb8aee3bf9adc0445e7ebe975609dded541
parent371f3fbf4ff123598f88b028ea168f0a31dbc12c
io_uring: iopoll requests should also wake task ->in_idle state

commit c93cc9e16d88e0f5ea95d2d65d58a8a4dab258bc upstream.

If we're freeing/finishing iopoll requests, ensure we check if the task
is in idling in terms of cancelation. Otherwise we could end up waiting
forever in __io_uring_task_cancel() if the task has active iopoll
requests that need cancelation.

Cc: stable@vger.kernel.org # 5.9+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c