Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp492793ybi; Fri, 7 Jun 2019 11:24:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjYPUnhvqFo2LUL1efYxEOTfd95nJ+R14mwz9yMOKUxO/3J9CqzsIIN3nSC/OYaGetcrpN X-Received: by 2002:a17:90a:2ec2:: with SMTP id h2mr7307266pjs.119.1559931848713; Fri, 07 Jun 2019 11:24:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559931848; cv=none; d=google.com; s=arc-20160816; b=eS8lWj1ruGchYmlgQYchziMxBPO67ribZcsPgCgI7U3b8EHHv6wHyLPeOLtqbY0/h+ MoAc5jcp47gggHqNzD8I80ePrzsqyEKyAhKpb6grt9BuStzhp50R/h01SkFCAxSwihtl 64StpqGsQ0aaHTj4Efx0cQ2/hTOhDtM1qyfZgUa/t6ddnY1wy282lqiOnwCrk2DGmr2a pFP8yh+EylnVt2ZnphbPoEXr8I+dEzeHs8aBTeurtw/PsswyoZSdqXOZ3C77+4+toJUj mSNdPbcVWoUC94nS/u4MhUqndDca3eqrlT115FtSLzPUh+ST9yA9SR1Nca4H+YtMPBW4 bXYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6aCEBz8PXNYOJelIyNI5Cyv3fUnqEn7LlS6VHhWx8cc=; b=ZneBwRp6CmKgcQ5LwPTw51yzoH+toxxzizDRptKbr4j8zupJjd2ns145K84dHv82SG KmeFkumOtRtFqxNeW76zo2bQ+u+nLY6NLLFF/TfcjaKmq06KXZchclYwT6AggG+vf9/W MuHMku2alDwM4umklS4lgFxE9g1Dg9Cy8qNsJFcc9Idsep4FewjuECcc4h9WJyr3xOki C6dbdhQFx/Xh7xTs65xaSUSgKxBEm+cdOeFa6IAZFURvIHICs8nn7UQbKlZ8jHRB4cv7 Mc8HaTTs4TgQxuEA5wLKl+iIh8zk5qG73MHYZCNMGzeS9UT6VWbUh9IzshMBvZ1TJtTy 4dig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="N56H/X7i"; 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 b21si2579609pjo.7.2019.06.07.11.23.52; Fri, 07 Jun 2019 11:24:08 -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="N56H/X7i"; 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 S1731895AbfFGPtI (ORCPT + 99 others); Fri, 7 Jun 2019 11:49:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:34772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731869AbfFGPtG (ORCPT ); Fri, 7 Jun 2019 11:49:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 AB55E2146E; Fri, 7 Jun 2019 15:49:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922545; bh=WL3vxbjU1dMtEmiUSmXm5+93WXu+jB8JtsEPTQopDYQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N56H/X7ijZaXuJK+oqQ1eKiOdbWg50ZSbb0dkYzswxP94Zb5cgRejVZJFX9M5r9TL QHeh0Jltkrdvm4oGzi4RD6SVPZH45KngbjU+3eaaa/kpb4Zt6kmPdlNXzMV90VqqxS J1YTXfD6Hx8jz9PI9KdlSF4lwLBJOUEc1mVw2bDw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhenliang Wei , Christian Brauner , Oleg Nesterov , "Eric W. Biederman" , Ivan Delalande , Arnd Bergmann , Thomas Gleixner , Deepa Dinamani , Andrew Morton , Linus Torvalds Subject: [PATCH 5.1 51/85] kernel/signal.c: trace_signal_deliver when signal_group_exit Date: Fri, 7 Jun 2019 17:39:36 +0200 Message-Id: <20190607153855.208382412@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153849.101321647@linuxfoundation.org> References: <20190607153849.101321647@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhenliang Wei commit 98af37d624ed8c83f1953b1b6b2f6866011fc064 upstream. 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: SEND_SIG_NOINFO matches the fact that SIGKILL doesn't have any info. Link: http://lkml.kernel.org/r/20190425025812.91424-1-weizhenliang@huawei.com Fixes: cf43a757fd4944 ("signal: Restore the stop PTRACE_EVENT_EXIT") Signed-off-by: Zhenliang Wei Reviewed-by: Christian Brauner Reviewed-by: Oleg Nesterov Cc: Eric W. Biederman Cc: Ivan Delalande Cc: Arnd Bergmann Cc: Thomas Gleixner Cc: Deepa Dinamani Cc: Greg Kroah-Hartman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- kernel/signal.c | 2 ++ 1 file changed, 2 insertions(+) --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2441,6 +2441,8 @@ relock: if (signal_group_exit(signal)) { ksig->info.si_signo = signr = SIGKILL; sigdelset(¤t->pending.signal, SIGKILL); + trace_signal_deliver(SIGKILL, SEND_SIG_NOINFO, + &sighand->action[SIGKILL - 1]); recalc_sigpending(); goto fatal; }