Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1949563yba; Sun, 21 Apr 2019 19:42:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQTEz3KcDviulVZw8Nl3/2xHZ0izlmqTrTyxYQdj/FtzLYgFokaCsoRvS4yYJ0BpFeC+/K X-Received: by 2002:a63:bd42:: with SMTP id d2mr16956784pgp.319.1555900953381; Sun, 21 Apr 2019 19:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555900953; cv=none; d=google.com; s=arc-20160816; b=VG0StchVAftCmtX8OV2QHbuNyYrTMhg1zfBTlyIqe0CWsjjPrl+G7SuehVEwlPxW52 Q3bU6CnrNXA5tbB0iJnLA2JFNZcuk38k80z1a1cSAxOh4KbHoNrBBOAjhqTKOqKJ19c9 nXErwjrFSHZHOxyv4/3QR+kbR+QYhrkcwNGUMNG0XdbQ/5MfF/5Vvzw/O52xqKOYcocV M3wnFcvzALGXDUA+O61rKmojxppJyvVP7UCibDcOZDvA89Cgo7IQDE5pqWL+LVzq6ob4 qOXnnpbZWrCaK5GI67Io6wG4uh2aAeZXB+P5KIfpi/p7C39TOq6cZvBBLUczL0b+6bP1 Qv7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=c+nAdm3VGBRihXIpMsKlVfiQxD9NpHFanxtfvaJ3khA=; b=Igu/pm0YpBtggi6P+xVpvm53AGYP/SYBNvbEDQMAOExdbfaU+FB+0dCmxSz2EMTn7n b6sSzdVQaJans5GuoWXoIYHtCjnaaThuBCEX7fmnZfPjFSVZtNoz5C/1htjI/Is5BrLW gsuPfkE4mmEeZDiEHhS32Ivh1r+0d846g3Tf77Q0SDn96aMMMDun9ttx15PBBFLqgSW1 UmURjIBZeAyMPiJ6SbhxoriiZ2Iz2rp4J95gxWvayH7n6qCfKgbB8GKEI0ip+wcVC5vp 77O+Uz53F7hh5R6ywlehMl8vIwpfdMaYP5tUNBa7HFN6RWFIbemSBV7dCzl+Kzz+AEDE r3Xg== 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 y14si11590727pll.379.2019.04.21.19.42.17; Sun, 21 Apr 2019 19:42:33 -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 S1726423AbfDVCh1 convert rfc822-to-8bit (ORCPT + 99 others); Sun, 21 Apr 2019 22:37:27 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:2563 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726252AbfDVCh0 (ORCPT ); Sun, 21 Apr 2019 22:37:26 -0400 Received: from dggemi402-hub.china.huawei.com (unknown [172.30.72.55]) by Forcepoint Email with ESMTP id 5F0A9B586E130D3D3AC8; Mon, 22 Apr 2019 10:37:24 +0800 (CST) Received: from DGGEMI530-MBX.china.huawei.com ([169.254.7.146]) by dggemi402-hub.china.huawei.com ([10.3.17.135]) with mapi id 14.03.0415.000; Mon, 22 Apr 2019 10:37:20 +0800 From: weizhenliang To: Oleg Nesterov CC: "ebiederm@xmission.com" , "colona@arista.com" , "akpm@linux-foundation.org" , "christian@brauner.io" , "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] signal: trace_signal_deliver when signal_group_exit Thread-Topic: [PATCH] signal: trace_signal_deliver when signal_group_exit Thread-Index: AdT4sMRJz5sKA+ApROaRV0FeV6WCvA== Date: Mon, 22 Apr 2019 02:37:21 +0000 Message-ID: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.40.99.192] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.