linux-yocto/io_uring
Jens Axboe 07471dfeef io_uring: include dying ring in task_work "should cancel" state
Commit 3539b1467e94336d5854ebf976d9627bfb65d6c3 upstream.

When running task_work for an exiting task, rather than perform the
issue retry attempt, the task_work is canceled. However, this isn't
done for a ring that has been closed. This can lead to requests being
successfully completed post the ring being closed, which is somewhat
confusing and surprising to an application.

Rather than just check the task exit state, also include the ring
ref state in deciding whether or not to terminate a given request when
run from task_work.

Cc: stable@vger.kernel.org # 6.1+
Link: https://github.com/axboe/liburing/discussions/1459
Reported-by: Benedek Thaler <thaler@thaler.hu>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-25 10:58:53 +02:00
..
advise.c
advise.h
alloc_cache.h
cancel.c
cancel.h
epoll.c
epoll.h
fdinfo.c io_uring/fdinfo: annotate racy sq/cq head/tail reads 2025-06-04 14:40:18 +02:00
fdinfo.h
filetable.c io_uring/filetable: ensure node switch is always done, if needed 2025-04-10 14:33:41 +02:00
filetable.h
fs.c
fs.h
io_uring.c io_uring: include dying ring in task_work "should cancel" state 2025-09-25 10:58:53 +02:00
io_uring.h io_uring: include dying ring in task_work "should cancel" state 2025-09-25 10:58:53 +02:00
io-wq.c io_uring/io-wq: inherit cpuset of cgroup in io worker 2024-10-17 15:21:14 +02:00
io-wq.h
kbuf.c io_uring/kbuf: account ring io_buffer_list memory 2025-07-06 10:58:04 +02:00
kbuf.h
Makefile
msg_ring.c
msg_ring.h
net.c io_uring/poll: fix POLLERR handling 2025-07-24 08:51:48 +02:00
net.h
nop.c io_uring: fail NOP if non-zero op flags is passed in 2024-06-12 11:02:55 +02:00
nop.h
notif.c
notif.h
opdef.c
opdef.h
openclose.c
openclose.h
poll.c io_uring: include dying ring in task_work "should cancel" state 2025-09-25 10:58:53 +02:00
poll.h
refs.h
rsrc.c io_uring: drop any code related to SCM_RIGHTS 2024-03-26 18:20:22 -04:00
rsrc.h io_uring: drop any code related to SCM_RIGHTS 2024-03-26 18:20:22 -04:00
rw.c io_uring/rw: commit provided buffer state on async 2025-02-21 13:49:53 +01:00
rw.h
slist.h
splice.c
splice.h
sqpoll.c io_uring/sqpoll: fix sqpoll error handling races 2025-01-02 10:30:54 +01:00
sqpoll.h
statx.c
statx.h
sync.c
sync.h
tctx.c io_uring/tctx: work around xa_store() allocation error issue 2024-12-14 19:54:49 +01:00
tctx.h
timeout.c io_uring: include dying ring in task_work "should cancel" state 2025-09-25 10:58:53 +02:00
timeout.h
uring_cmd.c
uring_cmd.h
xattr.c
xattr.h