diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-08-24 15:07:43 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-08-25 16:52:30 +0300 |
commit | 581711c46612c1fd7f98960f9ad53f04fdb89853 (patch) | |
tree | 85f8e79206ecb8fd9425913e467c30ca46d76169 /io_uring/net.h | |
parent | 5916943943d19a854238d50d1fe2047467cbeb3c (diff) | |
download | linux-581711c46612c1fd7f98960f9ad53f04fdb89853.tar.xz |
io_uring/net: save address for sendzc async execution
We usually copy all bits that a request needs from the userspace for
async execution, so the userspace can keep them on the stack. However,
send zerocopy violates this pattern for addresses and may reloads it
e.g. from io-wq. Save the address if any in ->async_data as usual.
Reported-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d7512d7aa9abcd36e9afe1a4d292a24cb2d157e5.1661342812.git.asml.silence@gmail.com
[axboe: fold in incremental fix]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/net.h')
-rw-r--r-- | io_uring/net.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/net.h b/io_uring/net.h index 7c438d39c089..f91f56c6eeac 100644 --- a/io_uring/net.h +++ b/io_uring/net.h @@ -31,6 +31,7 @@ struct io_async_connect { int io_shutdown_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); int io_shutdown(struct io_kiocb *req, unsigned int issue_flags); +int io_sendzc_prep_async(struct io_kiocb *req); int io_sendmsg_prep_async(struct io_kiocb *req); void io_sendmsg_recvmsg_cleanup(struct io_kiocb *req); int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); |