Skip to content
Commit 99c79f66 authored by Aleix Roca Nonell's avatar Aleix Roca Nonell Committed by Jens Axboe
Browse files

io_uring: fix manual setup of iov_iter for fixed buffers

Commit bd11b3a3 ("io_uring: don't use iov_iter_advance() for fixed
buffers") introduced an optimization to avoid using the slow
iov_iter_advance by manually populating the iov_iter iterator in some
cases.

However, the computation of the iterator count field was erroneous: The
first bvec was always accounted for an extent of page size even if the
bvec length was smaller.

In consequence, some I/O operations on fixed buffers were unable to
operate on the full extent of the buffer, consistently skipping some
bytes at the end of it.

Fixes: bd11b3a3

 ("io_uring: don't use iov_iter_advance() for fixed buffers")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarAleix Roca Nonell <aleix.rocanonell@bsc.es>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ae78ca3c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment