Skip to content
Commit e2033e33 authored by Stefan Bühler's avatar Stefan Bühler Committed by Jens Axboe
Browse files

io_uring: fix race condition reading SQE data



When punting to workers the SQE gets copied after the initial try.
There is a race condition between reading SQE data for the initial try
and copying it for punting it to the workers.

For example io_rw_done calls kiocb->ki_complete even if it was prepared
for IORING_OP_FSYNC (and would be NULL).

The easiest solution for now is to alway prepare again in the worker.

req->file is safe to prepare though as long as it is checked before use.

Signed-off-by: default avatarStefan Bühler <source@stbuehler.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a13f0655
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment