Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3571031yba; Tue, 23 Apr 2019 06:12:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOWedPy1mFIn7HpqUHsC5nxxqSoyHsuTImY9xiS60+CBxd21PnIveV+l9goa/JifYb29hc X-Received: by 2002:a63:b03:: with SMTP id 3mr10139291pgl.267.1556025173311; Tue, 23 Apr 2019 06:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556025173; cv=none; d=google.com; s=arc-20160816; b=TMnp0s+F81GyONw1A+enaB8n7hLwV0GTmjlu/h/P9T/TXGWKxFGS5gueVKPQ5tU0N0 b9MiMla0AMg3eEKTFsYIPS4GgzOBjLDSPe8IOiXUsDNTg5ZYw78V3qYRZD0ZwY8DbKyf vU/L8bQiPqIk5Pr7yeDjeZaprpwrhpgiQ1IYrfT8T62bJJloxgYiMpY3ctlKSgXKyYOQ 9VLDpekVQs0jxGch/VWxGntj+BG6hv7oL08tx7RxKHaOxQ1VGPnHRaYviLsvV0RK06qm BBD4KtjWcbsE80jlwVu2wgs1xyEwDcAOkZnK1sLdwCCUiy0w3bdAYSX+dS+mKDm1PjeT o09Q== 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=Os87/Q8NDcqJLlcM20xeP+4qOwAiCAUTt+Oye6qZ3+4=; b=qc6ewORFa9t+r5CtKU48Ui1XURZWfY2s7240PEcwIGZngoMwag/56mOl3crGZEkFmn e9/4YYMEiNnPIKdqM2enLRDuha31+k9nt0+7w3n7rJh9XUazamlngdYYr0An2GwaIG+6 d1fJxok+hE8c1T1osgwV9niJ8nRMawwoPjYVtt0TGnZS5vL6aq05lIXsLAyBHwtnGiLn UgpASdvQKA7rUVxCDiBzc9j7XyETJiXQ1cXuMztO/BXuP9i4zdsvuJvMOoE3oPHJBgKj d1lCM9J4fqKo29REhKz9Vsh/7sVIqE+va36NxU35Fp3VwwiLVA5TSOvIpIo7Lqxg0D5Y 6XQA== 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 ay8si15331666plb.202.2019.04.23.06.12.37; Tue, 23 Apr 2019 06:12:53 -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 S1728151AbfDWNK6 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 23 Apr 2019 09:10:58 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2992 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727725AbfDWNK5 (ORCPT ); Tue, 23 Apr 2019 09:10:57 -0400 Received: from dggemi405-hub.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id B63AF5F89F4749E473A9; Tue, 23 Apr 2019 21:10:54 +0800 (CST) Received: from DGGEMI530-MBX.china.huawei.com ([169.254.7.146]) by dggemi405-hub.china.huawei.com ([10.3.17.143]) with mapi id 14.03.0415.000; Tue, 23 Apr 2019 21:10:53 +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 v3] signal: trace_signal_deliver when signal_group_exit Thread-Topic: [PATCH v3] signal: trace_signal_deliver when signal_group_exit Thread-Index: AdT51YDlnU0d+FcxSneaCWEN6wQNxA== Date: Tue, 23 Apr 2019 13:10:52 +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 Mon, Apr 22, 2019 at 11:25 PM Oleg Nesterov wrote: >On 04/22, Zhenliang Wei wrote: >> >> --- 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; >> } > >Reviewed-by: Oleg Nesterov Last time Oleg suggested using SIG_DFL as the third parameter, but its type is 'void (*)(int)', but not expected 'struct k_sigaction *'. How about trace_signal_deliver(SIGKILL, SEND_SIG_NOINFO, &sighand->action[signr - 1]); ? Although we know that action[SIGKILL] must be SIG_DFL, in order to adapt to the parameter type, I suggest to use the original variable value. Zhenliang Wei.