Commit 12521a5
io_uring: fix CQ waiting timeout handling
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: [email protected]
Fixes: 2283396 ("io_uring: don't convert to jiffies for waiting on timeouts")
Signed-off-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/f7bffddd71b08f28a877d44d37ac953ddb01590d.1672915663.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <[email protected]>1 parent 59b745b commit 12521a5
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2470 | 2470 | | |
2471 | 2471 | | |
2472 | 2472 | | |
2473 | | - | |
| 2473 | + | |
2474 | 2474 | | |
2475 | 2475 | | |
2476 | 2476 | | |
| |||
2488 | 2488 | | |
2489 | 2489 | | |
2490 | 2490 | | |
2491 | | - | |
| 2491 | + | |
2492 | 2492 | | |
2493 | 2493 | | |
2494 | 2494 | | |
| |||
2564 | 2564 | | |
2565 | 2565 | | |
2566 | 2566 | | |
2567 | | - | |
| 2567 | + | |
2568 | 2568 | | |
2569 | 2569 | | |
2570 | 2570 | | |
| |||
0 commit comments