Skip to content
Snippets Groups Projects
Commit 82826a64 authored by Jens Axboe's avatar Jens Axboe Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: io_uring: ensure recv and recvmsg handle MSG_WAITALL correctly


commit 7ba89d2a upstream.

We currently don't attempt to get the full asked for length even if
MSG_WAITALL is set, if we get a partial receive. If we do see a partial
receive, then just note how many bytes we did and return -EAGAIN to
get it retried.

The iov is advanced appropriately for the vector based case, and we
manually bump the buffer and remainder for the non-vector case.

Cc: stable@vger.kernel.org
Reported-by: default avatarConstantine Gavrilov <constantine.gavrilov@gmail.com>
Change-Id: I618bde7c86b29f6053dd8cd19682f2916e57dd54
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Bug: 268174392
(cherry picked from commit aadd9b09)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 6ee6efe3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment