Re: [PATCH 2/2] io_uring: don't hold uring_lock when calling io_run_task_work*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux