Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2104809yba; Sun, 21 Apr 2019 23:59:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqytLd0SRkTBDUZYqPF+TU8tZPDTuNYO0mJVjzOF6NsTtyeMfeWcb6UZaNh6mL7gzqaXpPv9 X-Received: by 2002:a17:902:d701:: with SMTP id w1mr17714509ply.124.1555916371071; Sun, 21 Apr 2019 23:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555916371; cv=none; d=google.com; s=arc-20160816; b=yCqrZmlL2SU8biGWdT6LxRCFR0adRMwRHoOq3jw2cQHbCB/Q99yi1uDdq8Hcx3Y5+N 0DSOR8Yoqma7KGikrqravkV6vkkpBgS/n9bFzUUsdV5jmXhpvBlUTtNswwRZyHPzvoPL 9QThcIEm3B8/6l496ix5hQ2mXyF194DzK20mmIl2YcF1Zxl5OPO4WbtX5v6xx4IvgnV4 EmboacCfPIyCCg/xyCinm/yM0/iEZG1eEuVurUEtTn2d7eBYgDl5Nj2ZEMYZnGt/vKiz XWdIhuNeLMj2yFvuzTzbQlgPAmGs/3J/RIscWkbgJ4933R1RuxyEqLFbOlxHDglqj+yh /LsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Nm1W8mdlk5//Joz9MATpylkKfq9RYvVirnAvlqTOtOE=; b=vUxuxdsw9VP/sgkofQS/p1q+rercJ8+UoN/UKKhZsuh1vPCuZ9OKmVJkU4v7K2tc0H T5USrxcZ+u3N3QbfgfKwn0bP98rLvLtYM87q17lJobPtV6qxgQI5PB2swKwm0Xers8kQ tESmkQRNJxfbHkZQ0EwALPgqxTT/+wm2TqGdngObmjJLT37e6ZgtOMaa2ocrv7auDrS1 /nuKQhmD9M/+JKSWcgxri81dFOkY9giTpTe2VztPQd3Ax+NcFnWIxu0y8wrfHUW3Rqa3 GcFMqWqOuuwO3D4u8Jiy3vX32qAg8fq1V6BkhE4LHoL7WcuWsthvrY3iPkP8/lSJqEjC HBhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o9si11264434pgv.25.2019.04.21.23.59.16; Sun, 21 Apr 2019 23:59:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726859AbfDVG5N (ORCPT + 99 others); Mon, 22 Apr 2019 02:57:13 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:54726 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725914AbfDVG5M (ORCPT ); Mon, 22 Apr 2019 02:57:12 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5F1EBF3C6B258EAFB355; Mon, 22 Apr 2019 14:57:05 +0800 (CST) Received: from SZXY1W004751141.china.huawei.com (10.40.99.192) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Mon, 22 Apr 2019 14:56:58 +0800 From: Zhenliang Wei To: , , , , , , , , CC: , , Subject: [PATCH v2] signal: trace_signal_deliver when signal_group_exit Date: Mon, 22 Apr 2019 14:56:23 +0800 Message-ID: <20190422065623.49364-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. Note: The action[SIGKILL] must be SIG_DFL, and SEND_SIG_NOINFO matches the fact that SIGKILL doesn't have any info. Signed-off-by: Zhenliang Wei --- kernel/signal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/signal.c b/kernel/signal.c index 227ba170298e..0f69ada376ef 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2441,6 +2441,7 @@ 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, SIG_DFL); recalc_sigpending(); goto fatal; } -- 2.14.1.windows.1