]> git.ipfire.org Git - people/arne_f/kernel.git/commit
io_uring: don't use poll handler if file can't be nonblocking read/written
authorJens Axboe <axboe@kernel.dk>
Tue, 25 Aug 2020 18:27:50 +0000 (12:27 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:50 +0000 (11:29 +0200)
commit9ab83e1c4a31601a0006f8d26353012dc8876a92
tree0a6fa35e6e8b69aa71710dee89d7deaaf0f9e871
parentb7e397bcba0a0f8cc7aee8c8d9b5aa9a82c4fbe7
io_uring: don't use poll handler if file can't be nonblocking read/written

[ Upstream commit 9dab14b81807a40dab8e464ec87043935c562c2c ]

There's no point in using the poll handler if we can't do a nonblocking
IO attempt of the operation, since we'll need to go async anyway. In
fact this is actively harmful, as reading from eg pipes won't return 0
to indicate EOF.

Cc: stable@vger.kernel.org # v5.7+
Reported-by: Benedikt Ames <wisp3rwind@posteo.eu>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c