Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp337732yba; Sat, 20 Apr 2019 03:45:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvRwv0nat/z4xx38DfWHKLH7Yu1OpCjpiS1nbgu62sl8UMHiOV2j4apubte+RgTbOKenTO X-Received: by 2002:a17:902:2862:: with SMTP id e89mr9170739plb.203.1555757117855; Sat, 20 Apr 2019 03:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555757117; cv=none; d=google.com; s=arc-20160816; b=bH43U+WN/nmOfhSfsy844Jp5xGTcw3YiXndJgrA9IqWWauwyAKj2djAyvi5dTK8Uxx orvkq7eJTNPW8dg6pxjlg+6Q2+icZIgvny0gac2K/RaCpZWT4vcG7fscsDwLCjqitWZq 2zHTKfYRz8LXTzazCMJJNMy20YaSSMfhmBpf6MbD9maS44XiauhGj51hzzY3Wx2vDhbk ofuaGB3Q6OSrqOc/IGY09rs/3XpYMWmYBTmige5Pq49zmauy9+8K29NxTaRSwj8ytt2X vksL7Ee9JGK3cGqFo/22s1R55rYFyRKvK/VrEITQ+gRHgqq7NVozLYxMFDQNVZ97wx6y Oa0g== 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=laOt7AUwysPB424QqCmidkTuf6LHxG8/sSf4wjORZK0=; b=JwYr5LJYko66fBxyO9TwdZKycL2KjyW0rF8x5JdhKatDMBU/xOqQ6EdGFcaqKyLjOM /rxQ0YJiufT8S5cvk24JPBzJLBWxCxJzI+/gf8tbSV3kU3WfVOLGh/BUZHvH2IvWACnR MflIDU5G4fBBae18nt1K1JLfxQ9OFRwcmApqIG11/cBx8YUVMvycOLVdJaSr7L/GYX9j dgbMol4/L3F7gdul/bZhFKlSnuSQmem6SjaVHhASuRPNwLgbI+EccLZfFSl9E0thTGlu nVwUDhBI0mmBM9Si6pjV7LPX2HAiXXT+wdcmVowe4QadF9ZJeUOM4KnIKOfHfDmcsa50 S1/A== 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 j22si7917474pfi.167.2019.04.20.03.44.52; Sat, 20 Apr 2019 03:45:17 -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 S1726280AbfDTKl6 (ORCPT + 99 others); Sat, 20 Apr 2019 06:41:58 -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