]> 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)
commit2ecd8a174bf07458838f65f834311b7cbc05c03a
tree9a72c031a6b97bb8699c123e458a9b7daeda273a
parent4d817f0596675327d6e21768b27d8e52e3d258ca
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: c622fb5213e1 ("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