mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
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: 6f02527729 ("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>
This commit is contained in:
parent
0ed2e8bf61
commit
c36e28becd
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue