Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3012476yba; Mon, 22 Apr 2019 17:49:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNWqUGfRq0ywNCEuWKkbmG0UgxC1zOR9BlMm/w+CnY3dtLejtaoN/7LaUMN5sSujum21Nc X-Received: by 2002:a62:7089:: with SMTP id l131mr24425671pfc.158.1555980557546; Mon, 22 Apr 2019 17:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555980557; cv=none; d=google.com; s=arc-20160816; b=U7yUaDH6+2+6CcwB8mCecyo4YT4vI4xPr2B5dseu+w71X6PFL6iEkbz4e19La0XQlP sGt0ksen7L+b4Pu0WBBRLhFTUkKW0Mlo/20+oXungxlOSSxi8x/UrkekxCYI9VKlK6Qu tVnpNf7glrf8YJUzinsv1krNPE90uWYwum7LMF8DjXeqmxsQ5J/4t9XcZ9FWRMpCDldq b8Is2mm692P0AXp5imIdUVSJSrk0LZPirTGLolYo3JWcxJPVzAF6P/spwS0zdQ5g2rC0 eZGLGeg7iuvpfv9jqEN8lCzgpWaaq0oBVdwZ8vBO1oVYrT2EkRclc9+ypBaYQ2nKU+zU R2ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aOpUoOrucw+/WjgTGof80L4K+1NN28rTuzwqj0U+DtM=; b=QQiAJVER+ux9S01hIjrrpay44kx+d+vuMty/MRkhLLu6PTWB3eaPo01ZYzHjY9UUc8 0Qcr9T4VLF0VGKtdX1AOd4O3VtZdFQx9+EqkIIFW5LVLN+aVI5i/5eo2kITPadrost48 /LjPyPOjIVYuA/zvp5j9i2MNWW3s7ipug/khKz+oHIbLn9DAoCUTmqeEOPpbfITYwGvg SVzXrRuhmZY2XVzqkiRMKrWRyxIcvLCmb7QHhlxzVx93aOFi3PrEdDO0q9Yhl0BjYGXD lFT3lDPuSZuXwXZanPiaXLCCnm6NztflwypqveKW9Clts2VexeSLnIzwHovusIT/5W4z H4Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Rbc2ko9O; 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 92si14347558plw.138.2019.04.22.17.49.02; Mon, 22 Apr 2019 17:49: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; dkim=pass header.i=@kernel.org header.s=default header.b=Rbc2ko9O; 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 S1728642AbfDVUl4 (ORCPT + 99 others); Mon, 22 Apr 2019 16:41:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:54914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbfDVUl4 (ORCPT ); Mon, 22 Apr 2019 16:41:56 -0400 Received: from localhost (62-193-50-229.as16211.net [62.193.50.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1ECD420859; Mon, 22 Apr 2019 20:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555965715; bh=Yf1MetlrvGfpLssBO3O9YJ+2t5+frfMmAYhuiSRLAxk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Rbc2ko9OSmPWqxiHk2Vt1iLbLdJygxdWZ0rkBgDk4sxjMDQGRGHxH6Z+rp3psxopj dVbz/WmgQOVgGk/j7oTJL3u+8h5Qi/pNf1WjKKDT9tGJM0WuhYwuJqW3umkfd0y6D4 Y3SKd1EHz/4tgttKu2Q2JMFsG/BDfdVNurQExS38= Date: Mon, 22 Apr 2019 22:41:52 +0200 From: Greg KH To: Zhenliang Wei Cc: ebiederm@xmission.com, oleg@redhat.com, colona@arista.com, akpm@linux-foundation.org, christian@brauner.io, arnd@arndb.de, tglx@linutronix.de, deepa.kernel@gmail.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v3] signal: trace_signal_deliver when signal_group_exit Message-ID: <20190422204152.GA5869@kroah.com> References: <20190422145950.78056-1-weizhenliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190422145950.78056-1-weizhenliang@huawei.com> User-Agent: Mutt/1.11.4 (2019-03-13) 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 10:59:50PM +0800, Zhenliang Wei wrote: > In the fixes 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. > > 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. > > Acked-by: Christian Brauner > Fixes: cf43a757fd4944 ("signal: Restore the stop PTRACE_EVENT_EXIT") > 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 > > This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.