From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0417DC282E2 for ; Sat, 20 Apr 2019 10:42:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C581421855 for ; Sat, 20 Apr 2019 10:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727403AbfDTKl7 (ORCPT ); Sat, 20 Apr 2019 06:41:59 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7208 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725920AbfDTKl6 (ORCPT ); Sat, 20 Apr 2019 06:41:58 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A39F3D3ADEACC087FC07; Sat, 20 Apr 2019 18:41:53 +0800 (CST) Received: from SZXY1W004751141.china.huawei.com (10.40.99.192) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Sat, 20 Apr 2019 18:41:43 +0800 From: Zhenliang Wei To: , , , , , , , , CC: , , Subject: [PATCH] signal: trace_signal_deliver when signal_group_exit Date: Sat, 20 Apr 2019 18:41:02 +0800 Message-ID: <20190420104102.44336-1-weizhenliang@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.40.99.192] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the following 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. commit cf43a757fd4944 ("signal: Restore the stop PTRACE_EVENT_EXIT") Therefore, we need to add trace_signal_deliver before "goto fatal" after executing sigdelset. Signed-off-by: Zhenliang Wei --- kernel/signal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/signal.c b/kernel/signal.c index 227ba170298e..439b742e3229 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(signr, &ksig->info, + &sighand->action[signr - 1]); recalc_sigpending(); goto fatal; } -- 2.14.1.windows.1