diff options
| author | Pavel Begunkov <[email protected]> | 2020-07-03 22:15:06 +0300 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2020-07-05 15:07:35 -0600 |
| commit | 6df1db6b542436c6d429caa66e1045862fa36155 (patch) | |
| tree | d89e1b5a8d3dba341bef5a0c4a0035b8ce9424fd /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | c2c4c83c58cbca23527fee93b49738a5a84272a1 (diff) | |
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions