From: weizhenliang <weizhenliang@huawei.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: "ebiederm@xmission.com" <ebiederm@xmission.com>,
"colona@arista.com" <colona@arista.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"christian@brauner.io" <christian@brauner.io>,
"arnd@arndb.de" <arnd@arndb.de>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"deepa.kernel@gmail.com" <deepa.kernel@gmail.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] signal: trace_signal_deliver when signal_group_exit
Date: Mon, 22 Apr 2019 02:37:21 +0000 [thread overview]
Message-ID: <AF4D908CC0E2A24EB308A26962C8C3BDEB1476@DGGEMI530-MBX.china.huawei.com> (raw)
On 04/20, Oleg Nesterov wrote:
>On 04/20, Zhenliang Wei wrote:
>>
>> --- 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(signr, &ksig->info,
>> + &sighand->action[signr - 1]);
>
>Well, in this case ksig->info is not fully initialized for TP_STORE_SIGINFO() which reads si_errno/si_code...
>
>How about
>
> trace_signal_deliver(SIGKILL, SEND_SIG_NOINFO, SIG_DFL)
>
>?
>
>We know that action[SIGKILL] must be SIG_DFL.
>
>And SEND_SIG_NOINFO matches the fact that SIGKILL doesn't have any info,
>collect_signal() sets SI_USER and clears si_errno in this case.
>
>Oleg.
Thank you for your review, I agree with your suggestion, and I will recommit the patch later.
Zhenliang Wei.
next reply other threads:[~2019-04-22 2:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-22 2:37 weizhenliang [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-04-20 10:41 [PATCH] signal: trace_signal_deliver when signal_group_exit Zhenliang Wei
2019-04-20 11:22 ` 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=AF4D908CC0E2A24EB308A26962C8C3BDEB1476@DGGEMI530-MBX.china.huawei.com \
--to=weizhenliang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=christian@brauner.io \
--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 \
/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;
as well as URLs for NNTP newsgroup(s).