[SRU][R][PATCH 0/1] io_uring/eventfd: reset deferred signal state

loadingalias dev at rebasedinc.com
Tue Nov 17 20:39:11 UTC 2026


BugLink: https://bugs.launchpad.net/bugs/2174458

SRU Justification:

[Impact]

On the resolute 7.0 kernels, a registered io_uring eventfd signals
deferred task work only one time in the life of the registration.
After the first signal, the eventfd does not become readable when new
task work is queued. A program that waits on the eventfd with poll()
or epoll does not wake. Its completions wait until it calls
io_uring_enter() for another reason. An event loop that watches an
io_uring through its eventfd can stall.

The defect shows on a ring with IORING_SETUP_SINGLE_ISSUER |
IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_TASKRUN_FLAG and an eventfd
registered with IORING_REGISTER_EVENTFD. The trigger is a request that
waits in poll and then wakes, for example a receive on a socket that
has no data yet.

Cause: resolute carries upstream cd305ee3633a ("io_uring: defer eventfd
signaling when queued from a wakeup handler"), from the 6.18.49 stable
update. When a wakeup handler queues task work, __io_eventfd_signal()
sets IO_EVENTFD_OP_SIGNAL_BIT and defers the signal to an RCU callback.
io_eventfd_do_signal() never clears the bit. Thus the kernel skips each
later deferred signal.

[Fix]

Upstream commit 04fe9aeb4f3c ("io_uring/eventfd: reset deferred signal
state"), in v7.1. It adds one line: io_eventfd_do_signal() clears the
bit before it signals.

The patch applies cleanly to resolute master-next (Ubuntu-7.0.0-44.44).
The stable maintainers queued it for 6.18.y and 6.12.y on 2026-11-14.
The current stable releases, 6.18.63 and 6.12.117, do not have it yet.

[Test Plan]

1. Make a ring with IORING_SETUP_SINGLE_ISSUER |
   IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_TASKRUN_FLAG.
2. Register an eventfd with IORING_REGISTER_EVENTFD.
3. Submit IORING_OP_POLL_ADD (POLLIN) on the read end of an empty pipe.
4. Write one byte to the pipe.
5. Call poll() on the eventfd with a timeout of 1 second.
6. Read the eventfd. Call io_uring_enter() with IORING_ENTER_GETEVENTS
   and reap the completion. Drain the pipe.
7. Do steps 3 to 6 again on the same ring and registration.

Expected result: poll() reports the eventfd readable in both rounds.
On an affected kernel, the first round passes and the second poll()
times out.

I ran this test on kernel.org 6.18.63 and 6.12.117 (x86_64, QEMU),
with and without the patch. Without the patch, the second round times
out. With the patch, both rounds pass. A second test waits only on the
eventfd for two TCP receives that first get -EAGAIN. It gives the same
results. I will run both tests on a candidate kernel on EC2, x86_64
and arm64.

[Where problems could occur]

The change touches only the deferred eventfd signal path of io_uring.
Only programs that register an eventfd on a ring use that path. The
bit now clears before the deferred signal. Thus a wakeup that comes
while the callback runs can queue one more deferred signal. That signal
holds its own reference to the eventfd, so the eventfd is not freed
early. A regression would show as an extra eventfd signal. An extra
signal only makes a program check its completion queue one more time.

[Other Info]

Run evidence: linux-aws 7.0.0-1016-aws on EC2, x86_64 and arm64.
Source evidence: linux-aws 7.0.0-1018.19 (proposed) and linux
master-next 7.0.0-44.44 do not have the fix.
Not affected: v7.1 and later, which have 04fe9aeb4f3c. Kernels without
cd305ee3633a, such as the 6.1 kernel of Debian 12. I did not check
other Ubuntu series.
Upstream stable thread:
https://lore.kernel.org/stable/2026111310-pointer-citric-2f11@gregkh/T/

Yufan Chen (1):
  io_uring/eventfd: reset deferred signal state

 io_uring/eventfd.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.56.1




More information about the kernel-team mailing list