]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pid: Handle the exit of a multi-threaded init.
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 26 Mar 2013 09:27:11 +0000 (02:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 16:26:01 +0000 (09:26 -0700)
commit238f455f2f1af51a8c17db666cee5f380ab2bd01
tree63cedd5ebb7575b81318e7e29f713fd13ba839bf
parent882dc231e68ddd6ecc94fdb094c104b1ebe538c7
pid: Handle the exit of a multi-threaded init.

commit 751c644b95bb48aaa8825f0c66abbcc184d92051 upstream.

When a multi-threaded init exits and the initial thread is not the
last thread to exit the initial thread hangs around as a zombie
until the last thread exits.  In that case zap_pid_ns_processes
needs to wait until there are only 2 hashed pids in the pid
namespace not one.

v2. Replace thread_pid_vnr(me) == 1 with the test thread_group_leader(me)
    as suggested by Oleg.

Reported-by: Caj Larsson <caj@omnicloud.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/pid_namespace.c