lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140628115743.GB10829@htj.dyndns.org>
Date:	Sat, 28 Jun 2014 07:58:39 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Li Zefan <lizefan@...wei.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Cgroups <cgroups@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

Hello, Li.

On Fri, Jun 27, 2014 at 05:13:12PM +0800, Li Zefan wrote:
> +	for_each_subsys(ss, i) {
> +		if (!(opts.subsys_mask & (1 << i)) ||
> +		    ss->root == &cgrp_dfl_root)
> +			continue;
> +
> +		if (!percpu_ref_tryget_live(&ss->root->cgrp.self.refcnt)) {
> +			mutex_unlock(&cgroup_mutex);
> +			msleep(10);
> +			ret = restart_syscall();
> +			goto out_free;
> +		}

Why not just put it immediately?  We know that it's not gonna be
destroyed while holding cgroup_mutex.  It may look a bit weird but
this is a pretty special case anyway and deferring put doesn't buy
anything.

Thanks.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ