io_uring-6.15-20250522

-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmgve5YQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpkSrEACZkR7tg1ceo6dA/Gen4nXFslh1fqBx6lsP
 qK6xGA7ZhZMsQalY3EGGQ/Pz5fOaXq60Kps5FKZe3nslS+1+iq3CJ12t+T3JA6MI
 3+Bms67yubzAaBqIJi+di+GsDY4PgJieLme/Ojs4FLkHs85h6IeMBXBZ5Mvzy/pj
 mW9X/LxwWE+wgombRNzYi4Ta85KpoPp1r2hFkdeSD/WvjgZ3PktXYx1g9jPEUOE8
 ey80POW1J8q2v7IQaXBL0xRORMUCV4XD5vwnl5SXDBGVDo5tA0ychYRIvhjr51ui
 hNpF/bdCiMlprxaA2FPZt5OAkrsbcKuSI4Il5tsgmc6WPHE8gNPzXygZOtVhOdtD
 XfeJiNFaOrC17FFrzl3gYWmdxz+pWyNS4RInRFoUoqaVV1CXSrB+xr/rz/QU/L0d
 MlP+oOQQ7PrBhqJdncXEeAsl7VTDzH060hg6+kexz3T+vLf6yQMI0iBTlwyaINnD
 PEhJYje5p8wIre4khWHiv47KbPkh8rDg6Uv5XBLuZ0M4PJY5QYZT85MLhr1ICepy
 di1G6vynE3FKLbBGmRyDycES3zAxFGLjSG5AsP1xfDTsrwerN/wKqgP6D6ugQBCf
 E+CeL8J3dtM/JkuiJn8KBT117D8MVC6yT30kewcgYYZsFcgZiF1V7d0v5Kg+1ePj
 sTnOfT4xKw==
 =DbwT
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-6.15-20250522' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

 - Kill a duplicate function definition, which can cause linking issues
   in certain .config configurations. Introduced in this cycle.

 - Fix for a potential overflow CQE reordering issue if a re-schedule is
   done during posting. Heading to stable.

 - Fix for an issue with recv bundles, where certain conditions can lead
   to gaps in the buffers, where a contiguous buffer range was expected.
   Heading to stable.

* tag 'io_uring-6.15-20250522' of git://git.kernel.dk/linux:
  io_uring/net: only retry recv bundle for a full transfer
  io_uring: fix overflow resched cqe reordering
  io_uring/cmd: axe duplicate io_uring_cmd_import_fixed_vec() declaration
This commit is contained in:
Linus Torvalds 2025-05-22 13:05:00 -07:00
commit ab719cc7f5
3 changed files with 11 additions and 10 deletions

View File

@ -636,6 +636,7 @@ static void __io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool dying)
* to care for a non-real case.
*/
if (need_resched()) {
ctx->cqe_sentinel = ctx->cqe_cached;
io_cq_unlock_post(ctx);
mutex_unlock(&ctx->uring_lock);
cond_resched();

View File

@ -827,18 +827,24 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret,
cflags |= IORING_CQE_F_SOCK_NONEMPTY;
if (sr->flags & IORING_RECVSEND_BUNDLE) {
cflags |= io_put_kbufs(req, *ret, io_bundle_nbufs(kmsg, *ret),
size_t this_ret = *ret - sr->done_io;
cflags |= io_put_kbufs(req, *ret, io_bundle_nbufs(kmsg, this_ret),
issue_flags);
if (sr->retry)
cflags = req->cqe.flags | (cflags & CQE_F_MASK);
/* bundle with no more immediate buffers, we're done */
if (req->flags & REQ_F_BL_EMPTY)
goto finish;
/* if more is available, retry and append to this one */
if (!sr->retry && kmsg->msg.msg_inq > 0 && *ret > 0) {
/*
* If more is available AND it was a full transfer, retry and
* append to this one
*/
if (!sr->retry && kmsg->msg.msg_inq > 0 && this_ret > 0 &&
!iov_iter_count(&kmsg->msg.msg_iter)) {
req->cqe.flags = cflags & ~CQE_F_MASK;
sr->len = kmsg->msg.msg_inq;
sr->done_io += *ret;
sr->done_io += this_ret;
sr->retry = true;
return false;
}

View File

@ -17,9 +17,3 @@ bool io_uring_try_cancel_uring_cmd(struct io_ring_ctx *ctx,
struct io_uring_task *tctx, bool cancel_all);
void io_cmd_cache_free(const void *entry);
int io_uring_cmd_import_fixed_vec(struct io_uring_cmd *ioucmd,
const struct iovec __user *uvec,
size_t uvec_segs,
int ddir, struct iov_iter *iter,
unsigned issue_flags);