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
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:42:16 +02:00
fdinfo.h
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
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 io_uring: fail NOP if non-zero op flags is passed in 2024-06-12 11:11:18 +02:00
nop.h
notif.c
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 io_uring: drop any code related to SCM_RIGHTS 2024-03-26 18:19:09 -04:00
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
statx.c
statx.h
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