Commit c3222fd
io_uring: fix CQ waiting timeout handling
commit 12521a5 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: 2283396 ("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>1 parent b7b9bc9 commit c3222fd
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7598 | 7598 | | |
7599 | 7599 | | |
7600 | 7600 | | |
7601 | | - | |
| 7601 | + | |
7602 | 7602 | | |
7603 | 7603 | | |
7604 | 7604 | | |
| |||
7610 | 7610 | | |
7611 | 7611 | | |
7612 | 7612 | | |
7613 | | - | |
| 7613 | + | |
7614 | 7614 | | |
7615 | 7615 | | |
7616 | 7616 | | |
| |||
7673 | 7673 | | |
7674 | 7674 | | |
7675 | 7675 | | |
7676 | | - | |
| 7676 | + | |
7677 | 7677 | | |
7678 | 7678 | | |
7679 | 7679 | | |
| |||
0 commit comments