Re: [PATCH 01/10] cgroup: add cgroup_root_mutex

From: KAMEZAWA Hiroyuki
Date: Fri Nov 04 2011 - 04:39:56 EST


On Tue, 1 Nov 2011 16:46:24 -0700
Tejun Heo <tj@xxxxxxxxxx> wrote:

> cgroup wants to make threadgroup stable while modifying cgroup
> hierarchies which will introduce locking dependency on
> cred_guard_mutex from cgroup_mutex. This unfortunately completes
> circular dependency.
>
> A. cgroup_mutex -> cred_guard_mutex -> s_type->i_mutex_key -> namespace_sem
> B. namespace_sem -> cgroup_mutex
>
> B is from cgroup_show_options() and this patch breaks it by
> introducing another mutex cgroup_root_mutex which nests inside
> cgroup_mutex and protects cgroupfs_root.
>
> Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
> Cc: Oleg Nesterov <oleg@xxxxxxxxxx>

Thanks,
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/