]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/net: reject SEND_VECTORIZED when unsupported
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 2 Mar 2026 14:32:04 +0000 (14:32 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Mar 2026 16:17:04 +0000 (09:17 -0700)
IORING_SEND_VECTORIZED with registered buffers is not implemented but
could be. Don't silently ignore the flag in this case but reject it with
an error. It only affects sendzc as normal sends don't support
registered buffers.

Fixes: 6f02527729bd3 ("io_uring/net: Allow to do vectorized send")
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c

index 8576c6cb2236cbdbb08902e961f480157a20f4bc..d27adbe3f20be50d80d20987050cf8cd5161ed38 100644 (file)
@@ -375,6 +375,8 @@ static int io_send_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)
                kmsg->msg.msg_namelen = addr_len;
        }
        if (sr->flags & IORING_RECVSEND_FIXED_BUF) {
+               if (sr->flags & IORING_SEND_VECTORIZED)
+                       return -EINVAL;
                req->flags |= REQ_F_IMPORT_BUFFER;
                return 0;
        }