]> git.itanic.dy.fi Git - linux-stable/commit
io_uring/rw: don't allow multishot reads without NOWAIT support
authorJens Axboe <axboe@kernel.dk>
Mon, 1 Apr 2024 17:27:33 +0000 (11:27 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:38:16 +0000 (16:38 +0200)
commit7dc1ed215b07d9ea06cb1bb1b42f803d8cb1a2a9
treec2f088c86a02a2a0c8f3de12600589d0114a5459
parentda64e0edbb1bd6524b5287be834f31e074409986
io_uring/rw: don't allow multishot reads without NOWAIT support

commit 2a975d426c82ff05ec1f0b773798d909fe4a3105 upstream.

Supporting multishot reads requires support for NOWAIT, as the
alternative would be always having io-wq execute the work item whenever
the poll readiness triggered. Any fast file type will have NOWAIT
support (eg it understands both O_NONBLOCK and IOCB_NOWAIT). If the
given file type does not, then simply resort to single shot execution.

Cc: stable@vger.kernel.org
Fixes: fc68fcda04910 ("io_uring/rw: add support for IORING_OP_READ_MULTISHOT")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/rw.c