Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1193614ybn; Wed, 2 Oct 2019 12:14:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxrwFX14h1T+AY9BBDMw0uh9plsGaR0cbrSWSXKYGR7WTN5dBZUWHwbwNiYaUGiUl+CR+w X-Received: by 2002:a17:907:20e4:: with SMTP id rh4mr4450812ejb.59.1570043649767; Wed, 02 Oct 2019 12:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570043649; cv=none; d=google.com; s=arc-20160816; b=nZnoXI07+BZJXHAtOVy98jzXxsk9lh/6stKxKapkBmD5AWBxAlG+EsGk0osCZqbelB XI26T4dHCx1OXhggusOJmbgRo8CPF8im0dFymSpN6DRKxWlG5pEFdAAebEGMI/deBVDP iN+C24X7pFhadXEcsPij7osHW655seLkJ9pNkxvh18Pa2JhBm3/dAk08ej0HicQAmsah bZzZHmiBcRA/uVtgqn9GAWr23c1riHtueydnQIZ1kfJlQIyFyyM842dmOMbiXDAnxsZN yMLNDbxbTv07KMgzf6hxxm6Kq4hpDBq4ZbeljlAlZ1nCRZnKLWq7hzVNz9VQVOeO3VMV Orxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=YIEOSS34uxl0GUcIG4EEvApx/4KaWxZ5AuwTjqbf92s=; b=n+cOxbpKqoPGR63RCgLnYHDvmnosFIJSvRpvOu/Id+V3xcwdtDwM/jnG5loaTmk7UJ MPcCsseXoMW6hFYJWtWcawQYE8g+QS7tpGEOZybKA9OiUyy227y0ZPehKbJeELOkS+uI zw190xMWlLf/nPKG0qILwOyW85TlmiZ6hI5hqA7rrzJd+bx/7kGxfJtt2tEJ/J0MZOhY 8pOF7R6kmf87ECB3gFMOkc3ELAr3wjGO1M1APUawADl0DdTeYChAco/4Y6c4A5kzNsVz G3I+l6ICJQw7/dEN5UZG5DXD+87bRtAUquJrWikk7EvkrBWQK4wuwgusjnYFswvCiva8 ri3w== 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 z33si21359edz.314.2019.10.02.12.13.45; Wed, 02 Oct 2019 12:14:09 -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 S1730100AbfJBTM2 (ORCPT + 99 others); Wed, 2 Oct 2019 15:12:28 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35474 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729153AbfJBTIK (ORCPT ); Wed, 2 Oct 2019 15:08:10 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iFjyp-00036L-1f; Wed, 02 Oct 2019 20:08:07 +0100 Received: from ben by deadeye with local (Exim 4.92.1) (envelope-from ) id 1iFjyo-0003d9-68; Wed, 02 Oct 2019 20:08:06 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Thomas Gleixner" , "Eric W. Biederman" , "Oleg Nesterov" , "Ivan Delalande" , "Zhenliang Wei" , "Deepa Dinamani" , "Greg Kroah-Hartman" , "Linus Torvalds" , "Arnd Bergmann" , "Christian Brauner" Date: Wed, 02 Oct 2019 20:06:51 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 41/87] kernel/signal.c: trace_signal_deliver when signal_group_exit In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.75-rc1 review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Ben Hutchings --- kernel/signal.c | 2 ++ 1 file changed, 2 insertions(+) --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2277,6 +2277,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; }