io_uring: account io_uring internal files as REQ_F_INFLIGHT
authorJens Axboe <axboe@kernel.dk>
Tue, 9 Feb 2021 04:47:41 +0000 (04:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Feb 2021 12:54:57 +0000 (13:54 +0100)
commitd16692a34e8e60c76e0064ee7805bd5db1b0ef3b
tree12a4dbff9b08d47e8bf202d6d8ad367a8d914422
parent1e7eb063a0f084cbed2cd8db39e9644642130ff0
io_uring: account io_uring internal files as REQ_F_INFLIGHT

[ Upstream commit 02a13674fa0e8dd326de8b9f4514b41b03d99003 ]

We need to actively cancel anything that introduces a potential circular
loop, where io_uring holds a reference to itself. If the file in question
is an io_uring file, then add the request to the inflight list.

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