On 11/25/20 11:41 AM, Pavel Begunkov wrote: > When one task is in io_uring_cancel_files() and another is doing > io_prep_async_work() a race may happen. That's because after accounting > a request inflight in first call to io_grab_identity() it still may fail > and go to io_identity_cow(), which migh briefly keep dangling > work.identity and not only. > > Grab files last, so io_prep_async_work() won't fail if it did get into > ->inflight_list. > > note: the bug shouldn't exist after making io_uring_cancel_files() not > poking into other tasks' requests. Applied, thanks. -- Jens Axboe