io_uring/net: clear msg_controllen on partial sendmsg retry
authorJens Axboe <axboe@kernel.dk>
Mon, 19 Jun 2023 15:35:34 +0000 (09:35 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:12:24 +0000 (11:12 +0200)
commit4d729cc67b05b873055668c1868578f74ce17703
tree570aedd5135196817588e1ed62f11b199143bdce
parent4db49d59a89ce485fd247dff044686bba2a683b8
io_uring/net: clear msg_controllen on partial sendmsg retry

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@vger.kernel.org # 5.10+
Fixes: cac9e4418f4c ("io_uring/net: save msghdr->msg_control for retries")
Reported-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/net.c