[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1316801807.6834.14.camel@marge.simson.net>
Date: Fri, 23 Sep 2011 20:16:47 +0200
From: Mike Galbraith <efault@....de>
To: David Rientjes <rientjes@...gle.com>
Cc: Tejun Heo <htejun@...il.com>, Li Zefan <lizf@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>,
Paul Menage <paul@...lmenage.org>
Subject: Re: [patch] cpusets: allow PF_THREAD_BOUND kworkers to escape from
a cpuset
On Fri, 2011-09-23 at 16:33 +0200, Mike Galbraith wrote:
> @@ -1382,9 +1383,10 @@ static int cpuset_can_attach(struct cgroup_subsys *ss, struct cgroup *cont,
> * set of allowed nodes is unnecessary. Thus, cpusets are not
> * applicable for such threads. This prevents checking for success of
> * set_cpus_allowed_ptr() on all attached tasks before cpus_allowed may
> - * be changed.
> + * be changed. We also disallow attaching kthreadd, to prevent it's
> + * child from becoming trapped should it then acquire PF_THREAD_BOUND.
> */
> - if (tsk->flags & PF_THREAD_BOUND)
> + if (tsk->flags & PF_THREAD_BOUND || tsk == kthreadd_task)
> return -EINVAL;
>
> return 0;
And maybe || is_container_init(tsk) for symmetry.
-Mike
--
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