From: Christian Brauner <christian@brauner.io>
To: Zhenliang Wei <weizhenliang@huawei.com>
Cc: ebiederm@xmission.com, oleg@redhat.com, colona@arista.com,
akpm@linux-foundation.org, arnd@arndb.de, tglx@linutronix.de,
deepa.kernel@gmail.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v5] signal: trace_signal_deliver when signal_group_exit
Date: Thu, 25 Apr 2019 15:14:28 +0200 [thread overview]
Message-ID: <20190425131427.xhlzntanu22tyhvu@brauner.io> (raw)
In-Reply-To: <20190425025812.91424-1-weizhenliang@huawei.com>
On Thu, Apr 25, 2019 at 10:58:12AM +0800, Zhenliang Wei wrote:
> In the fixes commit, removing SIGKILL from each thread signal mask
> and executing "goto fatal" directly will skip the call to
> "trace_signal_deliver". At this point, the delivery tracking of the SIGKILL
> signal will be inaccurate.
>
> Therefore, we need to add trace_signal_deliver before "goto fatal"
> after executing sigdelset.
>
> Note: SEND_SIG_NOINFO matches the fact that SIGKILL doesn't have any info.
>
> Reviewed-by: Christian Brauner <christian@brauner.io>
> Reviewed-by: Oleg Nesterov <oleg@redhat.com>
> Cc: <stable@vger.kernel.org>
> Fixes: cf43a757fd4944 ("signal: Restore the stop PTRACE_EVENT_EXIT")
Thanks for the patience! I think this is now ready to be picked up. :)
Christian
>
> Signed-off-by: Zhenliang Wei <weizhenliang@huawei.com>
> ---
> kernel/signal.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 227ba170298e..429f5663edd9 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -2441,6 +2441,8 @@ bool get_signal(struct ksignal *ksig)
> if (signal_group_exit(signal)) {
> ksig->info.si_signo = signr = SIGKILL;
> sigdelset(¤t->pending.signal, SIGKILL);
> + trace_signal_deliver(SIGKILL, SEND_SIG_NOINFO,
> + &sighand->action[SIGKILL - 1]);
> recalc_sigpending();
> goto fatal;
> }
> --
> 2.14.1.windows.1
>
>
next prev parent reply other threads:[~2019-04-25 13:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 2:58 Zhenliang Wei
2019-04-25 13:14 ` Christian Brauner [this message]
2019-04-29 16:13 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190425131427.xhlzntanu22tyhvu@brauner.io \
--to=christian@brauner.io \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=colona@arista.com \
--cc=deepa.kernel@gmail.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=weizhenliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®