On 10/18/24 1:34 PM, Pavel Begunkov wrote: > On 10/18/24 19:38, Jens Axboe wrote: >> It's pretty pointless to use io_kiocb as intermediate storage for this, >> so split the validity check and the actual usage. > > The table is uring_lock protected, if we don't resolve in advance > we should take care of locking when importing. > > Another concern is adding a gap b/w setting a rsrc node and looking > up a buffer. That should be fine, but worth mentioning that when > you grab a rsrc node it also prevent destruction of all objects that > are created after this point. Yeah the last part should be fine, the first one surely not! I also notice that the check for too large an index now happens after the array_index_nospec(), that's also an issue. I'll spin a v2. We should just put it all in one place. -- Jens Axboe