From: Oleg Nesterov Date: Mon, 19 Mar 2012 16:03:41 +0000 (+0100) Subject: exit_signal: fix the "parent has changed security domain" logic X-Git-Tag: v3.2.17~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82b8227228169ca4c3b138f6ad1171913c14f784;p=pandora-kernel.git exit_signal: fix the "parent has changed security domain" logic commit b6e238dceed36891cc633167afe7151f1f3d83c5 upstream. exit_notify() changes ->exit_signal if the parent already did exec. This doesn't really work, we are not going to send the signal now if there is another live thread or the exiting task is traced. The parent can exec before the last dies or the tracer detaches. Move this check into do_notify_parent() which actually sends the signal. The user-visible change is that we do not change ->exit_signal, and thus the exiting task is still "clone children" for do_wait()->eligible_child(__WCLONE). Hopefully this is fine, the current logic is racy anyway. Signed-off-by: Oleg Nesterov Signed-off-by: Linus Torvalds Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed