On Fri, 13 Apr 2007 17:02:01 +0400
Oleg Nesterov <[EMAIL PROTECTED]> wrote:

> If kernel_thread(kthread) succeeds, kthread() can not fail on its path to
> complete(&create->started) + schedule(). After that it can't be woken because
> nobody can see the new task yet. This means:
> 
>       - we don't need tasklist_lock for find_task_by_pid().
> 
>       - create_kthread() doesn't need to wait for create->started. Instead,
>         kthread_create() first waits for create->created to get the result of
>         kernel_thread(), then waits for create->started to synchronize with
>         kthread().

Why don't we need tasklist_lock for find_task_by_pid()?  I'd have though that
we'd at least need rcu_read_lock(), and I'm not sure that the implicit
understanding of pid-management internals here is a great idea.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to