On 06/02/2021 11:34, Hao Xu wrote: > I saw percpu_ref_is_dying(&ctx->refs) check in sq thread but not > in io_uring_enter(), so I guess there could be another thread doing > io_uring_enter() and submiting sqes. Ok, looks tryget does it in a different fashion than I recalled. > So we can just put unlock and lock around io_run_task_work_sig() > to address the issue 2? io_set_resource_node() -> percpu_ref_get() If refs are left dying, it won't be safe for in-parallel enters. tryget or resurrect -- Pavel Begunkov