diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-11-28 12:42:11 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-11-28 12:42:11 -0800 |
| commit | 9917bf8e7f5a9efbab844cf06cfd8da8eb7e13b6 (patch) | |
| tree | a390d32ccf610e7929e58fad97ee5ff5e42662c4 | |
| parent | f3b17337b943949d0f3d12835d10d866210aeee8 (diff) | |
| parent | f6dc5a36195d3f5be769f60d6987150192dfb099 (diff) | |
| download | tip-9917bf8e7f5a9efbab844cf06cfd8da8eb7e13b6.tar.gz | |
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
| -rw-r--r-- | io_uring/io_uring.c | 2 | ||||
| -rw-r--r-- | io_uring/net.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 296667ba712cef..02339b74ba8d4e 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -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)) diff --git a/io_uring/net.c b/io_uring/net.c index a95cc9ca2a4d88..43d77f95db51d9 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -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; |
