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]
Date:	Thu, 8 Mar 2012 10:26:22 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Cgroups <cgroups@...r.kernel.org>, Mel Gorman <mgorman@...e.de>,
	David Rientjes <rientjes@...gle.com>,
	缪 勰 <miaox@...fujitsu.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC][PATCH] cgroup: fix race between fork and cgroup freezing

Hello, Li, Frederic.

On Thu, Mar 08, 2012 at 04:45:13PM +0800, Li Zefan wrote:
> +static void freezer_post_fork(struct cgroup_subsys *ss,
> +			      struct task_struct *task)
> +{
> +	struct freezer *freezer;
> +
> +	cgroup_lock();
> +
> +	freezer = task_freezer(task);
> +	if (!freezer->css.cgroup->parent)
> +		goto out;
> +
> +	spin_lock_irq(&freezer->lock);
> +	if (freezer->state != CGROUP_THAWED)
> +		freeze_task(task);
> +	spin_unlock_irq(&freezer->lock);
> +out:
> +	cgroup_unlock();
> +}

Urgh... this is requiring policy implementations to synchronize with
problem caused by cgroup core optimization and it's so very subtle.
IMHO, this definitely should be contained in cgroup core and in a very
confined form even inside cgroup core.

Any other ideas?

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