Skip to content

Commit e2d3758

Browse files
committed
t/io_uring: fix passthrough fixed buffer support
A previous commit changed t/io_uring to register a single region for all of the registered buffers, and while it updated non-passthrough IO for that change, the passthrough path still sets a specific buffer index. This makes passthrough with fixed buffers fail for any buffer but the first one, as it's asking for a buffer that doesn't exist rather than index the first one. That causes -EFAULT completions. Ensure the buf_index is set to 0 for passthrough as well. Fixes: 21f461f ("t/io_uring: register single buffer for whole IO region") Signed-off-by: Jens Axboe <[email protected]>
1 parent 0e0d9a3 commit e2d3758

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ static void init_io_pt(struct submitter *s, unsigned index)
628628
cmd->data_len = bs;
629629
if (fixedbufs) {
630630
sqe->uring_cmd_flags = IORING_URING_CMD_FIXED;
631-
sqe->buf_index = index;
631+
sqe->buf_index = 0;
632632
}
633633
cmd->nsid = f->nsid;
634634
cmd->opcode = 2;

0 commit comments

Comments
 (0)