OSDN Git Service

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)
commitc183edff33fdcd639d222a8f473bf44602adc655
tree9a72c031a6b97bb8699c123e458a9b7daeda273a
parent355afaeb578abac907217c256a844cfafb0337b2
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: ff6165b2d7f6 ("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