On 4/22/21 6:19 PM, Pavel Begunkov wrote: > With dynamic buffer updates, registered buffers in the table may change > at any moment. First of all we want to prevent future races between > updating and importing (i.e. io_import_fixed()), where the latter one > may happen without uring_lock held, e.g. from io-wq. > > A second problem is that currently we may do importing several times for > IORING_OP_{READ,WRITE}_FIXED, e.g. getting -EAGAIN on an inline attempt > and then redoing import after apoll/from iowq. In this case it can see > two completely different buffers, that's not good, especially since we > often hide short reads from the userspace. I don't think this is necessarily a problem. If you unregister a buffer before IO completion of that IO, then you are putting yourself solidly in grey zone areas anyway. You could still allow the short retry, just double check that it's the same buffer at that point as a sanity check. -- Jens Axboe