[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 11 Nov 2010 21:27:03 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Mike Galbraith <efault@....de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>,
Markus Trippelsdorf <markus@...ppelsdorf.de>
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.
--
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