Skip to content

io_uring fixes for 6.18-stable

Jens Axboe stable 1 version Applied

Status from this message: Queued the series for 6.18, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8io_uring/napi: don't end the single NAPI busy poll early on need_resched()io_uring/io_uring.h io_uring/napi.c+15 -170 replies
2/8io_uring: fail soft links on negative IOU_COMPLETE resultsio_uring/io_uring.c+5 -30 replies
3/8io_uring/futex: fail soft links when cancelling a waitio_uring/futex.c+1 -00 replies
4/8io_uring/rw: fail soft links on IOPOLL short or error IOio_uring/rw.c+3 -10 replies
5/8io_uring/timeout: don't rearm a multishot timeout on cancelio_uring/timeout.c+2 -10 replies
6/8io_uring/rsrc: keep the old file when a file update failsio_uring/rsrc.c+4 -30 replies
7/8io_uring/kbuf: initialize arg->out_len from arg->max_len in io_buffers_select()io_uring/kbuf.c+1 -00 replies
8/8io_uring/io-wq: apply the current cpuset to new workersio_uring/io-wq.c+39 -50 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 6.18.y 0/8] io_uring fixes for 6.18-stable

Hi Greg,

Here are io_uring fixes for 6.18-stable. All 8 patches are in Linus's tree. Patches 2-8 came with the io_uring-7.4 pull, merged as commit 78d9aedf2342 (tag io_uring-7.4-20261119); the others were merged earlier.

They apply on top of v6.18.64 plus queue-6.18 at stable-queue commit 3dd4b2d3c1f7, and also to v6.18.64 alone.

Patch 6 needed changes for 6.18; the [axboe: ...] note at the end of each says what was changed and why. The rest are clean backports.

Testing: ran the liburing-2.15-75-ga10946dc test suite in KVM guests (PROVE_LOCKING on) on the baseline v6.18.64 kernel and on the patched kernel, which is v6.18.64 plus these patches and the other io_uring commits already queued. The patched kernel failed exactly the same tests as the baseline. The failures that remain are on both kernels (napi-test timeout, send-zerocopy, timestamp and similar). No new dmesg splat (WARNING, BUG, lockdep, KASAN, Oops). io_uring/ builds without warnings on the release plus queue plus patches.

CVE assessment, by the io_uring maintainer:

Should not get a CVE:
1/8 io_uring/napi: don't end the single NAPI busy poll early on
need_resched()
The single NAPI busy poll ended on the first need_resched() and slept for the rest of the timeout. Busy poll duration only, a performance bug.
2/8 io_uring: fail soft links on negative IOU_COMPLETE results
io_issue_sqe() now calls req_set_fail() for negative IOU_COMPLETE results, so IOSQE_IO_LINK dependents of a failed request are cancelled. This only changes link semantics of the caller's own requests.
3/8 io_uring/futex: fail soft links when cancelling a wait
__io_futex_cancel() now calls req_set_fail(), so linked requests are cancelled. Only the caller's own link chain is affected.
4/8 io_uring/rw: fail soft links on IOPOLL short or error IO
The IOPOLL completion path now calls req_set_fail() when the result changed, so linked requests are cancelled after a short or failed read/write. Only the caller's own link chain is affected.
5/8 io_uring/timeout: don't rearm a multishot timeout on cancel
A cancelled multishot timeout was re-armed from the cancel task work. A zero interval plus moving the CQ head far ahead only delays teardown of the caller's own ring; the loop goes through hrtimer and workqueue, so it reschedules and holds no spinlock.
6/8 io_uring/rsrc: keep the old file when a file update fails
The old file was dropped from the registered slot before the new fd was checked, so a failed update left the slot empty and posted its tag CQE. Only the caller's own file table, no refcount or lifetime problem.
7/8 io_uring/kbuf: initialize arg->out_len from arg->max_len in

      io_buffers_select()
      Legacy provided buffers ignored sqe->len and used the full
      buf->len. The copy is still bounded by the length of the buffer
      the app provided, so this is data accounting visible to the app
      only.

8/8 io_uring/io-wq: apply the current cpuset to new workers
New io-wq workers took a stale copy of the cpuset, so they could run on CPUs the cgroup no longer has. cpuset is a CPU placement control, not a privilege boundary; the worst case is scheduling interference.

Cheng Yongkang (2):
io_uring/timeout: don't rearm a multishot timeout on cancel io_uring/rsrc: keep the old file when a file update fails

Cinq Prairie (1):
io_uring/napi: don't end the single NAPI busy poll early on
need_resched()

Mikhail Malyshev (1):
io_uring/io-wq: apply the current cpuset to new workers

Siddharth Chintamaneni (1):
io_uring/kbuf: initialize arg->out_len from arg->max_len in
io_buffers_select()

Yang Xiuwei (3):
io_uring: fail soft links on negative IOU_COMPLETE results io_uring/futex: fail soft links when cancelling a wait io_uring/rw: fail soft links on IOPOLL short or error IO

 io_uring/futex.c    |  1 +
 io_uring/io-wq.c    | 44 +++++++++++++++++++++++++++++++++++++++-----
 io_uring/io_uring.c |  8 +++++---
 io_uring/io_uring.h |  1 +
 io_uring/kbuf.c     |  1 +
 io_uring/napi.c     | 31 ++++++++++++++-----------------
 io_uring/rsrc.c     |  7 ++++---
 io_uring/rw.c       |  4 +++-
 io_uring/timeout.c  |  3 ++-
 9 files changed, 70 insertions(+), 30 deletions(-)
Signature · 1 line
2.55.0