On 8/16/21 7:49 PM, Jens Axboe wrote: > On 8/16/21 12:16 PM, Pavel Begunkov wrote: >> Even though it should be safe to poke into req->link after >> io_issue_sqe() in terms of races, it may end up retiring a request, e.g. >> when someone calls io_req_complete(). It'll be placed into an internal >> request cache, so the memory would be valid with other guarantees, but >> the request will be actually dismantled and with requests linked removed >> and enqueued. >> >> Hence, don't forget to remove REQ_F_ARM_LTIMEOUT after a linked timeout >> got disarmed, otherwise following io_prep_linked_timeout() will expect >> req->link to be not-zero and so fault. > > Since its tip of tree, I will just fold this one in. Perfect, thanks! -- Pavel Begunkov