]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: ensure async punted read/write requests copy iovec
authorJens Axboe <axboe@kernel.dk>
Mon, 2 Dec 2019 18:03:47 +0000 (11:03 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 3 Dec 2019 04:33:25 +0000 (21:33 -0700)
commit3adcd29a981547d359186e880ae8ca8aad67674b
tree3e53204915d5ec5ea6389294a4086f5e48218d78
parente3ec45232224e458aff9ac28236d27cc4afe5801
io_uring: ensure async punted read/write requests copy iovec

Currently we don't copy the iovecs when we punt to async context. This
can be problematic for applications that store the iovec on the stack,
as they often assume that it's safe to let the iovec go out of scope
as soon as IO submission has been called. This isn't always safe, as we
will re-copy the iovec once we're in async context.

Make this 100% safe by copying the iovec just once. With this change,
applications may safely store the iovec on the stack for all cases.

Reported-by: 李通洲 <carter.li@eoitek.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c