Merge tag 'io_uring-6.18-20251128' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull io_uring fixes from Jens Axboe:

 - Ensure that vectored registered buffer imports ties the lifetime of
   those to the zero-copy send notification, not the parent request

 - Fix a bug introduced in this merge window, with the introduction of
   mixed sized CQE support

* tag 'io_uring-6.18-20251128' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
  io_uring: fix mixed cqe overflow handling
  io_uring/net: ensure vectored buffer node import is tied to notification
This commit is contained in:
Linus Torvalds
2025-11-28 12:42:11 -08:00
2 changed files with 6 additions and 2 deletions

View File

@@ -634,6 +634,8 @@ static void __io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool dying)
is_cqe32 = true;
cqe_size <<= 1;
}
if (ctx->flags & IORING_SETUP_CQE32)
is_cqe32 = false;
if (!dying) {
if (!io_get_cqe_overflow(ctx, &cqe, true, is_cqe32))

View File

@@ -1532,8 +1532,10 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
unsigned uvec_segs = kmsg->msg.msg_iter.nr_segs;
int ret;
ret = io_import_reg_vec(ITER_SOURCE, &kmsg->msg.msg_iter, req,
&kmsg->vec, uvec_segs, issue_flags);
sr->notif->buf_index = req->buf_index;
ret = io_import_reg_vec(ITER_SOURCE, &kmsg->msg.msg_iter,
sr->notif, &kmsg->vec, uvec_segs,
issue_flags);
if (unlikely(ret))
return ret;
req->flags &= ~REQ_F_IMPORT_BUFFER;