]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
io_uring: fix blocking inline submission
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 9 Jun 2021 11:07:25 +0000 (12:07 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:31:41 +0000 (09:31 +0200)
commitd59d8ae39d9d7bc7b65ea968c6fef711d9734870
tree6f80e812d246eca40d1bd4ad8736cabc31ecf21d
parentf7a3e8f3e8b75f2559204d63643f6c159cd2c1ef
io_uring: fix blocking inline submission

BugLink: https://bugs.launchpad.net/bugs/1938340
commit 976517f162a05f4315b2373fd11585c395506259 upstream.

There is a complaint against sys_io_uring_enter() blocking if it submits
stdin reads. The problem is in __io_file_supports_async(), which
sees that it's a cdev and allows it to be processed inline.

Punt char devices using generic rules of io_file_supports_async(),
including checking for presence of *_iter() versions of rw callbacks.
Apparently, it will affect most of cdevs with some exceptions like
null and zero devices.

Cc: stable@vger.kernel.org
Reported-by: Birk Hirdman <lonjil@gmail.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d60270856b8a4560a639ef5f76e55eb563633599.1623236455.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/io_uring.c