We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f2af35 commit 9a57fffCopy full SHA for 9a57fff
io_uring/rsrc.c
@@ -469,7 +469,6 @@ static int __io_sqe_buffers_update(struct io_ring_ctx *ctx,
469
470
for (done = 0; done < nr_args; done++) {
471
struct io_mapped_ubuf *imu;
472
- int offset = up->offset + done;
473
u64 tag = 0;
474
475
err = io_copy_iov(ctx, &iov, iovs, done);
@@ -490,7 +489,7 @@ static int __io_sqe_buffers_update(struct io_ring_ctx *ctx,
490
489
if (err)
491
break;
492
493
- i = array_index_nospec(offset, ctx->nr_user_bufs);
+ i = array_index_nospec(up->offset + done, ctx->nr_user_bufs);
494
if (ctx->user_bufs[i] != ctx->dummy_ubuf) {
495
err = io_queue_rsrc_removal(ctx->buf_data, i,
496
ctx->rsrc_node, ctx->user_bufs[i]);
0 commit comments