Skip to content

io_uring: fix CQE32 and CQE_MIXED ring refill handling

Hui Peng io-uring lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 1 replyIn review

Changes in v2 from the cover letter

- Split into a 2-patch series and drop the third hunk from v1, as requested by Jens Axboe.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2io_uring: only insert skip CQE for IORING_SETUP_CQE_MIXEDio_uring/io_uring.c+2 -10 replies
2/2io_uring: require 3 free CQ slots for 32b CQE in io_fill_nop_cqe()io_uring/io_uring.c+6 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] io_uring: fix CQE32 and CQE_MIXED ring refill handling

This series fixes two issues in io_cqe_cache_refill() and io_fill_nop_cqe() for 32-byte CQEs:

1. Restrict skip CQE insertion at off + 1 == ctx->cq_entries to IORING_SETUP_CQE_MIXED rings so pure IORING_SETUP_CQE32 rings do not emit bogus IORING_CQE_F_SKIP entries.
2. Require 3 free CQ slots in io_fill_nop_cqe() before emitting a skip CQE for a 32-byte CQE wrapping across the end of an IORING_SETUP_CQE_MIXED ring, preventing an orphan skip CQE when fewer than 3 slots are free.

Changes in v2:
- Split into a 2-patch series and drop the third hunk from v1, as requested by Jens Axboe.

Hui Peng (2):
io_uring: only insert skip CQE for IORING_SETUP_CQE_MIXED
io_uring: require 3 free CQ slots for 32b CQE in io_fill_nop_cqe()

 io_uring/io_uring.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
2.55.0.1082.g2b9226bbc0-goog