Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH 6.12.y 0/9] io_uring fixes for 6.12-stable
@ 2026-11-21 21:31 Jens Axboe
  2026-11-21 21:31 ` [PATCH 6.12.y 1/9] io_uring: enable toggle of iowait usage when waiting on CQEs Jens Axboe
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Jens Axboe @ 2026-11-21 21:31 UTC (permalink / raw)
  To: stable

Hi Greg,

Here are io_uring fixes for 6.12-stable. All 9 patches are in Linus's
tree. Patches 3-9 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.12.118 plus queue-6.12 at stable-queue commit
3dd4b2d3c1f7, and also to v6.12.118 alone.

Patches 1, 3 and 6-7 needed changes for 6.12; the [axboe: ...] note at
the end of each says what was changed and why. The rest are clean
backports.

Patch 1/9 (io_uring: enable toggle of iowait usage when waiting on CQEs)
is a feature, not a fix. It is in stable because the QEMU developers
asked for it: QEMU uses IORING_ENTER_NO_IOWAIT and wants it supported on
all current stable kernels. Nothing changes unless the flag is set.

Testing: ran the liburing-2.15-75-ga10946dc test suite in KVM guests
(PROVE_LOCKING on) on the baseline v6.12.118 kernel and on the patched
kernel, which is v6.12.118 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/9 io_uring: enable toggle of iowait usage when waiting on CQEs
      Feature, not a fix. IORING_ENTER_NO_IOWAIT only skips setting
      in_iowait; nothing changes unless the flag is set.
  2/9 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.
  3/9 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.
  4/9 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.
  5/9 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.
  6/9 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.
  7/9 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.
  8/9 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.
  9/9 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()

Jens Axboe (1):
  io_uring: enable toggle of iowait usage when waiting on CQEs

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

 include/uapi/linux/io_uring.h |  2 ++
 io_uring/futex.c              |  1 +
 io_uring/io-wq.c              | 44 +++++++++++++++++++++++++++++++----
 io_uring/io_uring.c           | 39 +++++++++++++++++++------------
 io_uring/io_uring.h           |  1 +
 io_uring/kbuf.c               |  1 +
 io_uring/napi.c               | 31 +++++++++++-------------
 io_uring/rsrc.c               | 25 ++++++++++++--------
 io_uring/rw.c                 |  4 +++-
 io_uring/timeout.c            |  3 ++-
 10 files changed, 102 insertions(+), 49 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 6.12.y 0/9] io_uring fixes for 6.12-stable
@ 2026-11-07 16:15 Jens Axboe
  0 siblings, 0 replies; 12+ messages in thread
From: Jens Axboe @ 2026-11-07 16:15 UTC (permalink / raw)
  To: stable

Hi Greg,

Here are io_uring fixes for 6.12-stable. They were waiting on the
io_uring pull for 7.4-rc, which Linus has now merged.

They apply on top of v6.12.116 with the current queue-6.12 applied
(stable-queue 0ae08d01c389). They don't depend on anything in the queue,
and apply to v6.12.116 alone as well.

The io_uring series I sent earlier this week is already in queue-6.12,
these go on top of that.

Please take patches 1-3 together. Patch 2 closes a race that patch 1
opens up, and patch 3 fixes a WARN_ON_ONCE() that patch 2 introduces on
SQPOLL thread exit.

Patches 1, 6, 8 and 9 needed changes to apply to 6.12, the [axboe: ...]
note at the end of each says what was changed.

Chris Mason (1):
  io_uring/cancel: drop sqd->lock while SQPOLL waits

Jens Axboe (3):
  io_uring/sqpoll: don't attach to a thread that is canceling
  io_uring/poll: don't poll a writer for a read side hangup
  io_uring/poll: don't poll a writer for urgent data

Shakeel Butt (1):
  io_uring/sqpoll: do the return-to-userspace work in the SQPOLL thread

Shang En Sim (2):
  io_uring/cancel: count all requests that a CANCEL_ALL cancels
  io_uring/poll: cancel all matching requests in one pass

Shuai Liu (1):
  io_uring/sqpoll: don't set IO_SQ_THREAD_SHOULD_STOP on thread exit

Yuansheng Yang (1):
  io_uring/rsrc: hold uring_lock across index-alloc put_user

 io_uring/cancel.c   |  3 +-
 io_uring/io_uring.c | 23 +++++++++++++-
 io_uring/poll.c     | 77 +++++++++++++++++++++++++++++++++++++++------
 io_uring/rsrc.c     | 21 ++++++++++---
 io_uring/sqpoll.c   | 26 ++++++++++++++-
 5 files changed, 132 insertions(+), 18 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 6.12.y 0/9] io_uring fixes for 6.12-stable
@ 2026-11-04 18:43 Jens Axboe
  0 siblings, 0 replies; 12+ messages in thread
From: Jens Axboe @ 2026-11-04 18:43 UTC (permalink / raw)
  To: stable

Hi Greg,

Here are io_uring fixes for 6.12-stable.

They apply on top of v6.12.115 with the current queue-6.12 applied
(stable-queue 6575ff04f2fd). They don't depend on anything in the queue,
and apply to v6.12.115 alone as well.

"io_uring/io-wq: save worker type before dropping its reference" is
already in queue-6.12, so it's not included here.

Patches 5, 6, 7 and 9 needed changes to apply to 6.12, the [axboe: ...]
note in each says what was changed.

Cheng Yongkang (1):
  io_uring/timeout: count cancelled timeouts in cq_timeouts

Chris Mason (4):
  io_uring/rsrc: charge buffer arrays and nodes to memcg
  io_uring: charge tctx nodes and personalities
  io_uring: free XArray nodes left by a failed store
  io_uring/sqpoll: don't wait for the thread to exit

Daan De Meyer (1):
  io_uring/net: don't retry a non-blocking connect() that fails with
    -EAGAIN

Josef Bacik (1):
  io_uring/io-wq: no new workers once the exit has begun

Yichong Chen (2):
  io_uring/kbuf: advance head when a pickup empties the buffer ring
  io_uring/net: keep recvmsg buffer select length within MAX_RW_COUNT

 io_uring/io-wq.c    |  6 ++++++
 io_uring/io_uring.c |  3 ++-
 io_uring/kbuf.c     |  4 +++-
 io_uring/net.c      | 12 ++++++++++++
 io_uring/rsrc.c     |  4 ++--
 io_uring/sqpoll.c   | 28 +++++++++++++++++++++++-----
 io_uring/sqpoll.h   |  3 ++-
 io_uring/tctx.c     |  6 ++++--
 io_uring/timeout.c  |  3 +++
 9 files changed, 57 insertions(+), 12 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-11-21 21:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 21:31 [PATCH 6.12.y 0/9] io_uring fixes for 6.12-stable Jens Axboe
2026-11-21 21:31 ` [PATCH 6.12.y 1/9] io_uring: enable toggle of iowait usage when waiting on CQEs Jens Axboe
2026-11-21 21:31 ` [PATCH 6.12.y 2/9] io_uring/napi: don't end the single NAPI busy poll early on need_resched() Jens Axboe
2026-11-21 21:31 ` [PATCH 6.12.y 3/9] io_uring: fail soft links on negative IOU_COMPLETE results Jens Axboe
2026-11-21 21:31 ` [PATCH 6.12.y 4/9] io_uring/futex: fail soft links when cancelling a wait Jens Axboe
2026-11-21 21:31 ` [PATCH 6.12.y 5/9] io_uring/rw: fail soft links on IOPOLL short or error IO Jens Axboe
2026-11-21 21:31 ` [PATCH 6.12.y 6/9] io_uring/timeout: don't rearm a multishot timeout on cancel Jens Axboe
2026-11-21 21:31 ` [PATCH 6.12.y 7/9] io_uring/rsrc: keep the old file when a file update fails Jens Axboe
2026-11-21 21:31 ` [PATCH 6.12.y 8/9] io_uring/kbuf: initialize arg->out_len from arg->max_len in io_buffers_select() Jens Axboe
2026-11-21 21:31 ` [PATCH 6.12.y 9/9] io_uring/io-wq: apply the current cpuset to new workers Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2026-11-07 16:15 [PATCH 6.12.y 0/9] io_uring fixes for 6.12-stable Jens Axboe
2026-11-04 18:43 Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox