Skip to content

Commit c36e28b

Browse files
isilenceaxboe
authored andcommitted
io_uring/net: reject SEND_VECTORIZED when unsupported
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: 6f02527 ("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>
1 parent 0ed2e8b commit c36e28b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

io_uring/net.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@ static int io_send_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)
375375
kmsg->msg.msg_namelen = addr_len;
376376
}
377377
if (sr->flags & IORING_RECVSEND_FIXED_BUF) {
378+
if (sr->flags & IORING_SEND_VECTORIZED)
379+
return -EINVAL;
378380
req->flags |= REQ_F_IMPORT_BUFFER;
379381
return 0;
380382
}

0 commit comments

Comments
 (0)