Re: [RFC PATCH bpf-next 1/8] cgroup: Don't have to hold cgroup_mutex in task_cgroup_from_root()

Tejun Heo
2023-10-07T15:50:43Z

On Sat, Oct 07, 2023 at 02:02:57PM +0000, Yafang Shao wrote:
> The task cannot modify cgroups if we have already acquired the
> css_set_lock, thus eliminating the need to hold the cgroup_mutex. Following
> this change, task_cgroup_from_root() can be employed in non-sleepable contexts.
>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>

Maybe just drop lockdep_assert_held(&cgroup_mutex) from
cset_cgroup_from_root()?

Thanks.

--
tejun