]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix explicit async read/write mapping for large segments
authorJens Axboe <axboe@kernel.dk>
Sat, 5 Sep 2020 04:36:52 +0000 (22:36 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 5 Sep 2020 15:02:47 +0000 (09:02 -0600)
commit2da242b7cef5b2ce2e9a658e0d5b1273448e1685
tree9a72c031a6b97bb8699c123e458a9b7daeda273a
parent85e465188f90796ca3b0ae2d81f9e2cd4a5494c0
io_uring: fix explicit async read/write mapping for large segments

If we exceed UIO_FASTIOV, we don't handle the transition correctly
between an allocated vec for requests that are queued with IOSQE_ASYNC.
Store the iovec appropriately and re-set it in the iter iov in case
it changed.

Fixes: 2f0408fc0be9 ("io_uring: retain iov_iter state over io_read/io_write calls")
Reported-by: Nick Hill <nick@nickhill.org>
Tested-by: Norman Maurer <norman.maurer@googlemail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c