lkml.org 
[lkml]   [2006]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH rc1-mm] simplify exec from init's subthread
From
Date
Oleg Nesterov <oleg@tv-sign.ru> writes:

> [ On top of "exec: allow init to exec from any thread.",
> filename exec-allow-init-to-exec-from-any-thread.patch ]
>
> I think it is enough to take tasklist_lock for reading while
> changing child_reaper:
>
> Reparenting needs write_lock(tasklist_lock)
>
> Only one thread in a thread group can do exec()
>
> sighand->siglock garantees that get_signal_to_deliver()
> will not see a stale value of child_reaper.
>
> This means that we can change child_reaper earlier, without
> calling zap_other_threads() twice.
>
> "child_reaper = current" is a NOOP when init does exec from
> main thread, we don't care.

Looks good. I fat fingered my locking anyway, and this
looks like a good fix, as well as the more obvious place,
to do this.

Acked-by: Eric Biederman <ebiederm@xmission.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-02 05:48    [W:0.030 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site