]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
io_uring: ensure symmetry in handling iter types in loop_rw_iter()
authorJens Axboe <axboe@kernel.dk>
Sun, 12 Sep 2021 12:45:07 +0000 (06:45 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 13 Sep 2021 01:27:47 +0000 (19:27 -0600)
commit16c8d2df7ec0eed31b7d3b61cb13206a7fb930cc
tree0f4333c5ca72c75f502e78d4c806c5614a78dd37
parent6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f
io_uring: ensure symmetry in handling iter types in loop_rw_iter()

When setting up the next segment, we check what type the iter is and
handle it accordingly. However, when incrementing and processed amount
we do not, and both iter advance and addr/len are adjusted, regardless
of type. Split the increment side just like we do on the setup side.

Fixes: 4017eb91a9e7 ("io_uring: make loop_rw_iter() use original user supplied pointers")
Cc: stable@vger.kernel.org
Reported-by: Valentina Palmiotti <vpalmiotti@gmail.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c