]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - kernel/signal.c
job control: Job control stop notifications should always go to the real parent
authorTejun Heo <tj@kernel.org>
Wed, 23 Mar 2011 09:37:01 +0000 (10:37 +0100)
committerTejun Heo <tj@kernel.org>
Wed, 23 Mar 2011 09:37:01 +0000 (10:37 +0100)
commit62bcf9d992ecc19ea4f37ff57ee0b3333e3e843e
treea02286c9afffcda9361e0422370b78fe953df7de
parent75b95953a56969a990e6ce154b260be83818fe71
job control: Job control stop notifications should always go to the real parent

The stopped notifications in do_signal_stop() and exit_signals() are
always for the completion of job control.  The one in do_signal_stop()
may be delivered to the ptracer if PTRACE_ATTACH races with
notification and the one in exit_signals() if task exits while
ptraced.

In both cases, the notifications are meaningless and confusing to the
ptracer as it never accesses the group stop state while the real
parent would miss notifications for the events it is watching.

Make sure these notifications always go to the real parent by calling
do_notify_parent_cld_stop() with %false @for_ptrace.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
kernel/signal.c