]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] simplify exec from init's subthread
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 29 Mar 2006 00:10:59 +0000 (16:10 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 29 Mar 2006 02:36:40 +0000 (18:36 -0800)
commit1434261c07bcebd5ef8b8a18f919fdee533b84e0
tree1d0ba868866354569d2b8854a26ff48dbdbc1a98
parentfef23e7fbb11a0a78cd61935f7056bc2b237995a
[PATCH] simplify exec from init's subthread

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.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/exec.c