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:	Mon, 10 Oct 2011 10:31:02 -0700
From:	Tejun Heo <htejun@...il.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	rjw@...k.pl, paul@...lmenage.org, lizf@...fujitsu.com,
	linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org, fweisbec@...il.com,
	matthltc@...ibm.com, akpm@...ux-foundation.org,
	Paul Menage <menage@...gle.com>
Subject: Re: [PATCH 4/4] cgroup: always lock threadgroup during migration

On Sun, Sep 18, 2011 at 07:41:17PM +0200, Oleg Nesterov wrote:
> On 09/05, Tejun Heo wrote:
> >
> > * Remove -ESRCH failure path from cgroup_task_migrate().  With the
> >   above changes, it's guaranteed to be called only for live tasks.
> 
> I think you can remove another similar check,
> 
> > @@ -2044,6 +2044,10 @@ int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
> >  	tsk = leader;
> >  	i = 0;
> >  	do {
> > +		/* @tsk either already exited or can't exit until the end */
> > +		if (tsk->flags & PF_EXITING)
> > +			continue;
> > +
> >  		/* as per above, nr_threads may decrease, but not increase. */
> >  		BUG_ON(i >= group_size);
> >  		get_task_struct(tsk);
> 
> And then cgroup_attach_proc() does
> 
> 	for (i = 0; i < group_size; i++) {
> 		...
> 		task_lock(tsk);
> 		if (tsk->flags & PF_EXITING) {
> 			task_unlock(tsk);
> 			continue;
> 
> Afaics, this is no longer needed.

Indeed, removed.

Thank you.

-- 
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