diff options
author | Oleg Nesterov <oleg@redhat.com> | 2009-04-02 16:58:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 19:04:59 -0700 |
commit | 7f5d3652d469cdf9eb2365dfea7ce3fb9e1409cc (patch) | |
tree | 590f845665e166694ba0f9ba0e6d2267e15d8aae /include | |
parent | b1442b055c154699a6a2c436f3352f71b6beede3 (diff) | |
download | kernel_samsung_smdk4412-7f5d3652d469cdf9eb2365dfea7ce3fb9e1409cc.zip kernel_samsung_smdk4412-7f5d3652d469cdf9eb2365dfea7ce3fb9e1409cc.tar.gz kernel_samsung_smdk4412-7f5d3652d469cdf9eb2365dfea7ce3fb9e1409cc.tar.bz2 |
reparent_thread: fix a zombie leak if /sbin/init ignores SIGCHLD
If /sbin/init ignores SIGCHLD and we re-parent a zombie, it is leaked.
reparent_thread() does do_notify_parent() which sets ->exit_signal = -1 in
this case. This means that nobody except us can reap it, the detached
task is not visible to do_wait().
Change reparent_thread() to return a boolean (like __pthread_detach) to
indicate that the thread is dead and must be released. Also change
forget_original_parent() to add the child to ptrace_dead list in this
case.
The naming becomes insane, the next patch does the cleanup.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions