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: <1297108959.13327.54.camel@laptop>
Date:	Mon, 07 Feb 2011 21:02:39 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Paul Menage <menage@...gle.com>
Cc:	balbir@...ux.vnet.ibm.com, eranian@...gle.com,
	linux-kernel@...r.kernel.org, mingo@...e.hu, paulus@...ba.org,
	davem@...emloft.net, fweisbec@...il.com,
	perfmon2-devel@...ts.sf.net, eranian@...il.com,
	robert.richter@....com, acme@...hat.com, lizf@...fujitsu.com
Subject: Re: [RFC][PATCH] cgroup: Fix cgroup_subsys::exit callback

On Mon, 2011-02-07 at 11:28 -0800, Paul Menage wrote:
> On Mon, Feb 7, 2011 at 8:10 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > Make the ::exit method act like ::attach, it is after all very nearly
> > the same thing.
> 
> The major difference between attach and exit is that the former is
> only triggered in response to user cgroup-management action, whereas
> the latter is triggered whenever a task exits, even if cgroups aren't
> set up.

And the major likeness is that they both migrate a task from one cgroup
to another. You cannot simply ignore that.

> >  void cgroup_exit(struct task_struct *tsk, int run_callbacks)
> >  {
> > -       int i;
> >        struct css_set *cg;
> > +       int i;
> >
> > -       if (run_callbacks && need_forkexit_callback) {
> > -               /*
> > -                * modular subsystems can't use callbacks, so no need to lock
> > -                * the subsys array
> > -                */
> > -               for (i = 0; i < CGROUP_BUILTIN_SUBSYS_COUNT; i++) {
> > -                       struct cgroup_subsys *ss = subsys[i];
> > -                       if (ss->exit)
> > -                               ss->exit(ss, tsk);
> > -               }
> > -       }
> > +       mutex_lock(&cgroup_mutex);
> 
> NACK - cgroup_mutex is way too heavy to take in the task exit path.
> We'll need to find some other way to fix this if it's really needed.
> task->alloc_lock is also normally a valid thing to synchronize against
> cgroup moves, but I'd have to look at the exit path to see if it's
> still valid there.

If maybe you're like respond more often than about once every two months
I might actually care what you think. 

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