diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2020-07-03 22:15:06 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2020-07-05 15:07:35 -0600 |
| commit | 6df1db6b542436c6d429caa66e1045862fa36155 (patch) | |
| tree | d89e1b5a8d3dba341bef5a0c4a0035b8ce9424fd /tools/perf/scripts/python | |
| parent | io_uring: use new io_req_task_work_add() helper throughout (diff) | |
| download | linux-6df1db6b542436c6d429caa66e1045862fa36155.tar.gz linux-6df1db6b542436c6d429caa66e1045862fa36155.zip | |
io_uring: fix mis-refcounting linked timeouts
io_prep_linked_timeout() sets REQ_F_LINK_TIMEOUT altering refcounting of
the following linked request. After that someone should call
io_queue_linked_timeout(), otherwise a submission reference of the linked
timeout won't be ever dropped.
That's what happens in io_steal_work() if io-wq decides to postpone linked
request with io_wqe_enqueue(). io_queue_linked_timeout() can also be
potentially called twice without synchronisation during re-submission,
e.g. io_rw_resubmit().
There are the rules, whoever did io_prep_linked_timeout() must also call
io_queue_linked_timeout(). To not do it twice, io_prep_linked_timeout()
will return non NULL only for the first call. That's controlled by
REQ_F_LINK_TIMEOUT flag.
Also kill REQ_F_QUEUE_TIMEOUT.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
