linux-yocto/io_uring
Jens Axboe abc9f859a9 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 11:00:09 +02:00
..
advise.c io_uring: always go async for unsupported fadvise flags 2023-01-29 15:18:26 -07:00
advise.h
alloc_cache.h
cancel.c
cancel.h
epoll.c io_uring: undeprecate epoll_ctl support 2023-05-26 20:22:41 -06:00
epoll.h
fdinfo.c io_uring/fdinfo: annotate racy sq/cq head/tail reads 2025-06-04 14:42:16 +02:00
fdinfo.h io_uring: move fdinfo helpers to its own file 2022-07-24 18:39:12 -06:00
filetable.c io_uring: drop any code related to SCM_RIGHTS 2024-03-26 18:19:09 -04:00
filetable.h
fs.c
fs.h
io_uring.c io_uring: include dying ring in task_work "should cancel" state 2025-09-25 11:00:09 +02:00
io_uring.h io_uring: include dying ring in task_work "should cancel" state 2025-09-25 11:00:09 +02:00
io-wq.c io_uring: fix task leak issue in io_wq_create() 2025-06-27 11:08:58 +01:00
io-wq.h
kbuf.c io_uring/kbuf: account ring io_buffer_list memory 2025-06-27 11:08:43 +01:00
kbuf.h io_uring/kbuf: use vm_insert_pages() for mmap'ed pbuf ring 2025-03-22 12:50:45 -07:00
Makefile
msg_ring.c io_uring: use io_file_from_index in io_msg_grab_file 2023-06-20 09:36:22 -06:00
msg_ring.h
net.c io_uring/net: commit partial buffers on retry 2025-08-28 16:28:11 +02:00
net.h
nop.c
nop.h io_uring: move nop into its own file 2022-07-24 18:39:11 -06:00
notif.c io_uring/notif: add constant for ubuf_info flags 2023-04-15 14:21:04 -06:00
notif.h
opdef.c io_uring: make fallocate be hashed work 2025-07-17 18:35:20 +02:00
opdef.h
openclose.c
openclose.h
poll.c io_uring: include dying ring in task_work "should cancel" state 2025-09-25 11:00:09 +02:00
poll.h
refs.h io_uring: always do atomic put from iowq 2025-05-02 07:50:57 +02:00
rsrc.c io_uring: unify io_pin_pages() 2025-03-22 12:50:45 -07:00
rsrc.h
rw.c io_uring/rw: fix wrong NOWAIT check in io_rw_init_file() 2025-06-19 15:28:45 +02:00
rw.h
slist.h
splice.c
splice.h
sqpoll.c io_uring/sqpoll: fix sqpoll error handling races 2025-01-02 10:32:10 +01:00
sqpoll.h io_uring/sqpoll: fix io-wq affinity when IORING_SETUP_SQPOLL is used 2023-08-16 13:40:28 -06:00
statx.c
statx.h io_uring: move statx handling to its own file 2022-07-24 18:39:11 -06:00
sync.c
sync.h
tctx.c io_uring/tctx: work around xa_store() allocation error issue 2024-12-14 20:00:17 +01:00
tctx.h
timeout.c io_uring: include dying ring in task_work "should cancel" state 2025-09-25 11:00:09 +02:00
timeout.h
uring_cmd.c io_uring/uring_cmd: use cached cmd_op in io_uring_cmd_sock() 2025-02-08 09:52:33 +01:00
uring_cmd.h
xattr.c
xattr.h