io_uring: fix io_sqe_files_unregister() hangs
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 30 Dec 2020 21:34:15 +0000 (21:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Jan 2021 13:56:51 +0000 (14:56 +0100)
commitce00a7d0d9523192d0a9dd954f9993358f19a536
tree4eea139071767f2ed47461ba8f082170e32236e9
parentb25b86936a8dccd6f6ec9045bede4774b6c7c7cf
io_uring: fix io_sqe_files_unregister() hangs

commit 1ffc54220c444774b7f09e6d2121e732f8e19b94 upstream.

io_sqe_files_unregister() uninterruptibly waits for enqueued ref nodes,
however requests keeping them may never complete, e.g. because of some
userspace dependency. Make sure it's interruptible otherwise it would
hang forever.

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