Messages in this thread | | | Date | Thu, 11 Nov 2010 21:27:03 +0100 | From | Oleg Nesterov <> | Subject | Re: [RFC/RFT PATCH v3] sched: automated per tty task groups |
| |
I didn't read this patch carefully (yet) but,
On 11/11, Mike Galbraith wrote: > > @@ -2569,6 +2576,7 @@ void sched_fork(struct task_struct *p, i > * Silence PROVE_RCU. > */ > rcu_read_lock(); > + autogroup_fork(p);
Surely this doesn't need rcu.
But the real problem is that copy_process() can fail after that, and in this case we have the unbalanced kref_get().
> +++ linux-2.6.36.git/kernel/exit.c > @@ -174,6 +174,7 @@ repeat: > write_lock_irq(&tasklist_lock); > tracehook_finish_release_task(p); > __exit_signal(p); > + sched_autogroup_exit(p);
This doesn't look right. Note that "p" can run/sleep after that (or in parallel), set_task_rq() can use the freed ->autogroup.
Btw, I can't apply this patch...
Oleg.
| |