This is a note to let you know that I've just added the patch titled io_uring/net: clear msg_controllen on partial sendmsg retry to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: io_uring-net-clear-msg_controllen-on-partial-sendmsg-retry.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 309fd8aa08da865a2fa8935d006c932bcd4ae216 Mon Sep 17 00:00:00 2001 From: Jens Axboe <axboe@xxxxxxxxx> Date: Fri, 23 Jun 2023 07:39:42 -0600 Subject: io_uring/net: clear msg_controllen on partial sendmsg retry From: Jens Axboe <axboe@xxxxxxxxx> Commit b1dc492087db0f2e5a45f1072a743d04618dd6be upstream. If we have cmsg attached AND we transferred partial data at least, clear msg_controllen on retry so we don't attempt to send that again. Cc: stable@xxxxxxxxxxxxxxx # 5.10+ Fixes: cac9e4418f4c ("io_uring/net: save msghdr->msg_control for retries") Reported-by: Stefan Metzmacher <metze@xxxxxxxxx> Reviewed-by: Stefan Metzmacher <metze@xxxxxxxxx> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- io_uring/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -5064,6 +5064,8 @@ static int io_recvmsg(struct io_kiocb *r if (ret == -ERESTARTSYS) ret = -EINTR; if (ret > 0 && io_net_retry(sock, flags)) { + kmsg->msg.msg_controllen = 0; + kmsg->msg.msg_control = NULL; sr->done_io += ret; req->flags |= REQ_F_PARTIAL_IO; return io_setup_async_msg(req, kmsg); Patches currently in stable-queue which might be from axboe@xxxxxxxxx are queue-5.10/io_uring-net-clear-msg_controllen-on-partial-sendmsg-retry.patch queue-5.10/io_uring-net-disable-partial-retries-for-recvmsg-with-cmsg.patch queue-5.10/io_uring-net-save-msghdr-msg_control-for-retries.patch