diff options
author | Hao Xu <[email protected]> | 2021-08-27 17:46:09 +0800 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2021-08-27 07:27:24 -0600 |
commit | a8295b982c46d4a7c259a4cdd58a2681929068a9 (patch) | |
tree | 355d0a213dbeee99690c97ba0984116288645322 /lib/test_fortify/write_overflow-memcpy.c | |
parent | 14afdd6ee3a0db7bcae887d1951ed21c4d1539cd (diff) |
io_uring: fix failed linkchain code logic
Given a linkchain like this:
req0(link_flag)-->req1(link_flag)-->...-->reqn(no link_flag)
There is a problem:
- if some intermediate linked req like req1 's submittion fails, reqs
after it won't be cancelled.
- sqpoll disabled: maybe it's ok since users can get the error info
of req1 and stop submitting the following sqes.
- sqpoll enabled: definitely a problem, the following sqes will be
submitted in the next round.
The solution is to refactor the code logic to:
- if a linked req's submittion fails, just mark it and the head(if it
exists) as REQ_F_FAIL. Leverage req->result to indicate whether it
is failed or cancelled.
- submit or fail the whole chain when we come to the end of it.
Signed-off-by: Hao Xu <[email protected]>
Reviewed-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-memcpy.c')
0 files changed, 0 insertions, 0 deletions