]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] fix do_wait() vs exec() race
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 23 Nov 2005 21:37:43 +0000 (13:37 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 24 Nov 2005 00:08:39 +0000 (16:08 -0800)
commit962b564cf1ec8041e8890a3c3847e3a630a08f42
treea238616355c02496177e486d78f9a75911e943b6
parent8bf1101bd52573e0573e374d56d2feecdbb5e444
[PATCH] fix do_wait() vs exec() race

When non-leader thread does exec, de_thread adds old leader to the init's
->children list in EXIT_ZOMBIE state and drops tasklist_lock.

This means that release_task(leader) in de_thread() is racy vs do_wait()
from init task.

I think de_thread() should set old leader's state to EXIT_DEAD instead.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: george anzinger <george@mvista.com>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/exec.c