On Mon, May 18, 2015 at 07:34:45PM +0300, Vladimir Davydov wrote:
> >  
> >     /*
> > +    * We either moving the whole group of threads,
> > +    * either a single thread process.
> > +    */
> > +   if (cgroup_taskset_size(tset) == 1) {
> 
> != ?
> 
> > +           task = cgroup_taskset_first(tset);
> > +           if (!thread_group_leader(task) && !thread_group_empty(task))
> > +                   return -EINVAL;

No, ==. The thing is that the kernel carries about multithreaded
tasks and groups all threads into the array. In turn, when task
is attached via pid (ie ve/ctid/tasks). the kernel simply looks
up for a task, put it into an array and pass to us. So it's our
duty to check that the only one task has been passed and if so
we need to check it's not a thread from some multithreaded
application.
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to