Messages in this thread | | | Date | Sun, 18 Sep 2011 20:46:13 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 3/4] threadgroup: extend threadgroup_lock() to cover exit and exec |
| |
On 09/18, Oleg Nesterov wrote: > > Of course I am in no position to ack the changes in this code, I do not > fell I understand it enough. But afaics this series is fine. ^^^^ I do not feel ;)
> If I am right, afaics the only change 4/4 needs is that it should not add > WARN_ON_ONCE(tsk->flags & PF_EXITING) into cgroup_task_migrate().
Hmm. Unless I missed something this WARN_ON_ONCE() is not right anyway, because
> - * Call holding cgroup_mutex. May take task_lock of > - * the task 'tsk' during call. > + * Call with cgroup_mutex and threadgroup locked. May take task_lock of > + * @tsk during call. > */ > int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk)
this is not true, cgroup_attach_proc() has other callers.
cgroup_attach_task_all() is probably fine, tsk should be current.
but cpuset_do_move_task() doesn't look fine at first glance, we can race with the exiting task.
And this leads to another question about the cgroup_mutex/threadgroup_lock nesting...
Oleg.
| |