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:Constantine Gavrilov <constantine.gavrilov@gmail.com> Change-Id: Ic855be831471c36f579c6e9025698a4b81f4e4b2 Signed-off-by:
Jens Axboe <axboe@kernel.dk> Signed-off-by:
Sasha Levin <sashal@kernel.org> (cherry picked from commit 9b7b0f21) Bug: 268174392 Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
Loading
Please sign in to comment