lkml.org 
[lkml]   [2011]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] cpusets: allow PF_THREAD_BOUND kworkers to escape from a cpuset
From
Date
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



\
 
 \ /
  Last update: 2011-09-23 20:19    [W:0.177 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site