]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring/net: correctly handle multishot recvmsg retry setup
authorJens Axboe <axboe@kernel.dk>
Fri, 8 Mar 2024 00:48:03 +0000 (17:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:29 +0000 (15:28 +0200)
commitf55ecbd9a78c3d718f449d8dfd98b1a73c46cbe3
treeaab8cc81487c74c8c0eb05ba2cb6e974146c1729
parent1a6efd4c286ca9d00f1354df4466b37ca4f4a04f
io_uring/net: correctly handle multishot recvmsg retry setup

[ Upstream commit deaef31bc1ec7966698a427da8c161930830e1cf ]

If we loop for multishot receive on the initial attempt, and then abort
later on to wait for more, we miss a case where we should be copying the
io_async_msghdr from the stack to stable storage. This leads to the next
retry potentially failing, if the application had the msghdr on the
stack.

Cc: stable@vger.kernel.org
Fixes: 9bb66906f23e ("io_uring: support multishot in recvmsg")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
io_uring/net.c