summaryrefslogtreecommitdiff
path: root/fs/io-wq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-11-10 23:34:16 -0700
committerJens Axboe <axboe@kernel.dk>2019-11-11 16:33:22 -0700
commit76a46e066e2d93bd333599d1c84c605c2c4cc909 (patch)
tree82fcc39ec1a8553c24ae5d87f679777e494a6bc1 /fs/io-wq.h
parent768134d4f48109b90f4248feecbeeb7d684e410c (diff)
io_uring: fix -ENOENT issue with linked timer with short timeout
If you prep a read (for example) that needs to get punted to async context with a timer, if the timeout is sufficiently short, the timer request will get completed with -ENOENT as it could not find the read. The issue is that we prep and start the timer before we start the read. Hence the timer can trigger before the read is even started, and the end result is then that the timer completes with -ENOENT, while the read starts instead of being cancelled by the timer. Fix this by splitting the linked timer into two parts: 1) Prep and validate the linked timer 2) Start timer The read is then started between steps 1 and 2, so we know that the timer will always have a consistent view of the read request state. Reported-by: Hrvoje Zeba <zeba.hrvoje@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.h')
0 files changed, 0 insertions, 0 deletions