linux-stable/io_uring
Pavel Begunkov b026bb1617 io_uring: fix CQ waiting timeout handling
commit 12521a5d5c upstream.

Jiffy to ktime CQ waiting conversion broke how we treat timeouts, in
particular we rearm it anew every time we get into
io_cqring_wait_schedule() without adjusting the timeout. Waiting for 2
CQEs and getting a task_work in the middle may double the timeout value,
or even worse in some cases task may wait indefinitely.

Cc: stable@vger.kernel.org
Fixes: 228339662b ("io_uring: don't convert to jiffies for waiting on timeouts")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f7bffddd71b08f28a877d44d37ac953ddb01590d.1672915663.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-12 12:00:46 +01:00
..
Makefile
advise.c io_uring: make io_kiocb_to_cmd() typesafe 2022-08-12 17:01:00 -06:00
advise.h
alloc_cache.h
cancel.c io_uring: fix off-by-one in sync cancelation file check 2022-08-23 07:26:08 -06:00
cancel.h
epoll.c io_uring: make io_kiocb_to_cmd() typesafe 2022-08-12 17:01:00 -06:00
epoll.h
fdinfo.c io_uring: fix fdinfo sqe offsets calculation 2022-10-21 12:39:29 +02:00
fdinfo.h
filetable.c io_uring/filetable: fix file reference underflow 2022-12-02 17:43:09 +01:00
filetable.h
fs.c io_uring: make io_kiocb_to_cmd() typesafe 2022-08-12 17:01:00 -06:00
fs.h
io-wq.c io-wq: Fix memory leak in worker creation 2022-10-26 12:22:57 +02:00
io-wq.h
io_uring.c io_uring: fix CQ waiting timeout handling 2023-01-12 12:00:46 +01:00
io_uring.h io_uring: clear TIF_NOTIFY_SIGNAL if set and task_work not available 2022-12-02 17:43:12 +01:00
kbuf.c io_uring: check for rollover of buffer ID when providing buffers 2022-11-16 10:04:09 +01:00
kbuf.h io_uring/kbuf: fix not advancing READV kbuf ring 2022-09-07 10:36:10 -06:00
msg_ring.c io_uring: dont remove file from msg_ring reqs 2023-01-04 11:26:29 +01:00
msg_ring.h
net.c io_uring/net: fix cleanup after recycle 2022-12-31 13:26:53 +01:00
net.h io_uring/net: rename io_sendzc() 2022-10-21 12:39:27 +02:00
nop.c
nop.h
notif.c io_uring/notif: Remove the unused function io_notif_complete() 2022-09-05 11:42:39 -06:00
notif.h io_uring/net: simplify zerocopy send user API 2022-09-01 09:13:33 -06:00
opdef.c io_uring: dont remove file from msg_ring reqs 2023-01-04 11:26:29 +01:00
opdef.h io_uring: dont remove file from msg_ring reqs 2023-01-04 11:26:29 +01:00
openclose.c io_uring: make io_kiocb_to_cmd() typesafe 2022-08-12 17:01:00 -06:00
openclose.h
poll.c io_uring: make poll refs more robust 2022-12-02 17:43:12 +01:00
poll.h
refs.h
rsrc.c io_uring/af_unix: defer registered files gc to io_uring release 2022-10-21 12:37:33 +02:00
rsrc.h Revert "io_uring: rename IORING_OP_FILES_UPDATE" 2022-09-01 09:13:33 -06:00
rw.c io_uring: remove iopoll spinlock 2022-12-31 13:26:53 +01:00
rw.h io_uring/rw: don't lose partial IO result on fail 2022-10-21 12:37:32 +02:00
slist.h
splice.c io_uring: make io_kiocb_to_cmd() typesafe 2022-08-12 17:01:00 -06:00
splice.h
sqpoll.c
sqpoll.h
statx.c io_uring: make io_kiocb_to_cmd() typesafe 2022-08-12 17:01:00 -06:00
statx.h
sync.c io_uring: make io_kiocb_to_cmd() typesafe 2022-08-12 17:01:00 -06:00
sync.h
tctx.c
tctx.h
timeout.c io_uring: protect cq_timeouts with timeout_lock 2022-12-31 13:26:53 +01:00
timeout.h
uring_cmd.c lsm/stable-6.0 PR 20220829 2022-08-31 09:23:16 -07:00
uring_cmd.h
xattr.c io_uring: make io_kiocb_to_cmd() typesafe 2022-08-12 17:01:00 -06:00
xattr.h