]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring/net: save address for sendzc async execution
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 24 Aug 2022 12:07:43 +0000 (13:07 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Aug 2022 13:52:30 +0000 (07:52 -0600)
commit5e7f86260c0f44e7b437559b44e1a5b68513e9a1
tree85f8e79206ecb8fd9425913e467c30ca46d76169
parent2be90fa0f00073b930f1733d0e2812a086cb9708
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>
io_uring/net.c
io_uring/net.h
io_uring/opdef.c