io_uring/net: disable partial retries for recvmsg with cmsg
authorJens Axboe <axboe@kernel.dk>
Mon, 19 Jun 2023 15:41:05 +0000 (09:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Jun 2023 13:34:07 +0000 (07:34 -0600)
commit78d0d2063bab954d19a1696feae4c7706a626d48
tree9c8572efadb68af87e4eed514b8d7d2b0f57c5c4
parentb1dc492087db0f2e5a45f1072a743d04618dd6be
io_uring/net: disable partial retries for recvmsg with cmsg

We cannot sanely handle partial retries for recvmsg if we have cmsg
attached. If we don't, then we'd just be overwriting the initial cmsg
header on retries. Alternatively we could increment and handle this
appropriately, but it doesn't seem worth the complication.

Move the MSG_WAITALL check into the non-multishot case while at it,
since MSG_WAITALL is explicitly disabled for multishot anyway.

Link: https://lore.kernel.org/io-uring/0b0d4411-c8fd-4272-770b-e030af6919a0@kernel.dk/
Cc: stable@vger.kernel.org # 5.10+
Reported-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c