Re: [PATCH -next] cgroup: fix missing unlock on error in cgroup_load_subsys()

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

 



On 2013/12/9 20:38, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> 
> Add the missing unlock before return from function cgroup_load_subsys()
> in the error handling case.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

Acked-by: Li Zefan <lizefan@xxxxxxxxxx>

but it conflicts with Vladimir's bug fix.

> ---
>  kernel/cgroup.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index fb1193b..402f7aa 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -4618,6 +4618,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss)
>  	if (IS_ERR(css)) {
>  		/* failure case - need to deassign the cgroup_subsys[] slot. */
>  		cgroup_subsys[ss->subsys_id] = NULL;
> +		mutex_unlock(&cgroup_root_mutex);
>  		mutex_unlock(&cgroup_mutex);
>  		return PTR_ERR(css);
>  	}
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux