Commit 3e6a0d3
committed
io_uring: fix -EAGAIN retry with IOPOLL
We no longer revert the iovec on -EIOCBQUEUED, see commit ab2125d,
and this started causing issues for IOPOLL on devies that run out of
request slots. Turns out what outside of needing a revert for those, we
also had a bug where we didn't properly setup retry inside the submission
path. That could cause re-import of the iovec, if any, and that could lead
to spurious results if the application had those allocated on the stack.
Catch -EAGAIN retry and make the iovec stable for IOPOLL, just like we do
for !IOPOLL retries.
Cc: <stable@vger.kernel.org> # 5.9+
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reported-by: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent dc7bbc9 commit 3e6a0d3
1 file changed
+31
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2423 | 2423 | | |
2424 | 2424 | | |
2425 | 2425 | | |
2426 | | - | |
2427 | 2426 | | |
2428 | | - | |
| 2427 | + | |
2429 | 2428 | | |
2430 | | - | |
2431 | 2429 | | |
| 2430 | + | |
2432 | 2431 | | |
2433 | 2432 | | |
2434 | 2433 | | |
2435 | | - | |
| 2434 | + | |
| 2435 | + | |
2436 | 2436 | | |
2437 | 2437 | | |
2438 | 2438 | | |
2439 | 2439 | | |
2440 | 2440 | | |
2441 | 2441 | | |
2442 | | - | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
2443 | 2452 | | |
2444 | 2453 | | |
2445 | 2454 | | |
| |||
2482 | 2491 | | |
2483 | 2492 | | |
2484 | 2493 | | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
2485 | 2507 | | |
2486 | 2508 | | |
2487 | 2509 | | |
| |||
3230 | 3252 | | |
3231 | 3253 | | |
3232 | 3254 | | |
| 3255 | + | |
| 3256 | + | |
3233 | 3257 | | |
3234 | 3258 | | |
3235 | 3259 | | |
| |||
3361 | 3385 | | |
3362 | 3386 | | |
3363 | 3387 | | |
| 3388 | + | |
| 3389 | + | |
3364 | 3390 | | |
3365 | 3391 | | |
3366 | 3392 | | |
| |||
0 commit comments