On 8/20/21 4:19 PM, Hao Xu wrote: > coml_nr in ctx_flush_and_put() is not protected by uring_lock, this > may cause problems when accessing it parallelly: > > say coml_nr > 0 > > ctx_flush_and put other context > if (compl_nr) get mutex > coml_nr > 0 > do flush > coml_nr = 0 > release mutex > get mutex > do flush (*) > release mutex > > in (*) place, we call io_cqring_ev_posted() and users likely get > none events there. Applied, thanks. -- Jens Axboe