• Oleg Nesterov's avatar
    [PATCH] fix do_wait() vs exec() race · 962b564c
    Oleg Nesterov authored
    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: default avatarOleg 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: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    962b564c
exec.c 34.5 KB