Received: by 10.192.165.148 with SMTP id m20csp4842489imm; Tue, 24 Apr 2018 09:13:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx48N5Dh7+E4A98b/jF2ANGoopK7pe30VhbePgprZeCPIFX2eyvaHSV8vhUf17IanMxjc84c1 X-Received: by 2002:a17:902:a58a:: with SMTP id az10-v6mr16605498plb.210.1524586418770; Tue, 24 Apr 2018 09:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524586418; cv=none; d=google.com; s=arc-20160816; b=xkaqB167DbFr7+nPJzukqPWXl032cxs6zyDaTwlIfIXunX8yzN3ROaEFulAKljrRHa 88f0L9IVm82iT3y7raEMijPhUQXO7Clz8EjMko8vgOIv6AgjTDUBSp+vj5HiNv2hcDVi vmu070FAMomX2DZvh/vfxEtA5v8Jc8BNaZ//Ba5U7QPRGJsda9CqZFyed7C0CB/KySID cdEfHWSDVDm4fuviE3VUomM6+jHkuOLOFXXr+dfM2Mnr7/677yvaivGNPG6uBoQh+4Y9 9toayKjWC68HR8MBl4L5yvGjYEAOA2Nh7FuH0GQ/KNZIreu4YwUaMLnugRoglZZfiyA9 Rkyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from :arc-authentication-results; bh=88UkNidIC/UVWfs21RGhk5+wGi8No3v72jL1BMQZWn8=; b=puBhboObArE9cLz6dteL81/+5iIFbnhPkQ3wwHO1vT3/SKa6UUbzeQtf6bKFiK4p7+ v3TCjOR0SZ5k4bkOHUhcKTA1slr8FTjenCl7tIcBW7dNHKAi93ZeoloKqEQijNkqJ+Tf hRdmEpTfwQR5EKaeBmihmMAoza0O58wVt6imiQQ30xE9RamIkpBTxYIzmlPuCrPMZT8c PXfDmYiW2JrfhzmVSte2mXlIIc40aMUMF63LpaXA3hjam4VVxSLPkJzvwcGSbJ7kYsmQ NeIkVQiuK5Pnr9wBWmPC/sLUBw40XtQjKmcW6FGaMt+2W+cNKloszDovtkZlIOTmWaEe AvZA== 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 z7si538717pgv.228.2018.04.24.09.13.24; Tue, 24 Apr 2018 09:13:38 -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 S1751860AbeDXQML (ORCPT + 99 others); Tue, 24 Apr 2018 12:12:11 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:47530 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835AbeDXQMK (ORCPT ); Tue, 24 Apr 2018 12:12:10 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fB0Y5-0005RN-3m; Tue, 24 Apr 2018 10:12:09 -0600 Received: from [97.119.174.25] (helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fB0Y4-0003AS-0Y; Tue, 24 Apr 2018 10:12:08 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Andrey Grodzovsky Cc: , , , , , , References: <1524583836-12130-1-git-send-email-andrey.grodzovsky@amd.com> <1524583836-12130-2-git-send-email-andrey.grodzovsky@amd.com> Date: Tue, 24 Apr 2018 11:10:42 -0500 In-Reply-To: <1524583836-12130-2-git-send-email-andrey.grodzovsky@amd.com> (Andrey Grodzovsky's message of "Tue, 24 Apr 2018 11:30:34 -0400") Message-ID: <87a7tsd1q5.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1fB0Y4-0003AS-0Y;;;mid=<87a7tsd1q5.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=97.119.174.25;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/Ue7LpzCBd+hy5tcoUKLrFirZLnTqpFJM= X-SA-Exim-Connect-IP: 97.119.174.25 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa04.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01,XMNoVowels, XMSolicitRefs_0,XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa04 1397; Body=1 Fuz1=1 Fuz2=1] * 0.1 XMSolicitRefs_0 Weightloss drug * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Andrey Grodzovsky X-Spam-Relay-Country: X-Spam-Timing: total 615 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 2.4 (0.4%), b_tie_ro: 1.71 (0.3%), parse: 0.75 (0.1%), extract_message_metadata: 12 (2.0%), get_uri_detail_list: 1.16 (0.2%), tests_pri_-1000: 7 (1.1%), tests_pri_-950: 1.12 (0.2%), tests_pri_-900: 0.91 (0.1%), tests_pri_-400: 18 (2.9%), check_bayes: 17 (2.8%), b_tokenize: 6 (0.9%), b_tok_get_all: 6 (0.9%), b_comp_prob: 1.79 (0.3%), b_tok_touch_all: 2.4 (0.4%), b_finish: 0.52 (0.1%), tests_pri_0: 129 (21.0%), check_dkim_signature: 0.48 (0.1%), check_dkim_adsp: 5 (0.9%), tests_pri_500: 441 (71.8%), poll_dns_idle: 434 (70.7%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 1/3] signals: Allow generation of SIGKILL to exiting task. X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrey Grodzovsky writes: > Currently calling wait_event_killable as part of exiting process > will stall forever since SIGKILL generation is suppresed by PF_EXITING. > > In our partilaur case AMDGPU driver wants to flush all GPU jobs in > flight before shutting down. But if some job hangs the pipe we still want to > be able to kill it and avoid a process in D state. This makes me profoundly uncomfotable. You are changing the linux semantics of what it means for a process to be exiting. Functionally this may require all kinds of changes to when we allow processes to stop processing signals. So without a really good thought out explanation that takes into account all of the issues involved in process exiting and posix conformance. Nacked-by: "Eric W. Biederman" Eric > Signed-off-by: Andrey Grodzovsky > --- > kernel/signal.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/signal.c b/kernel/signal.c > index c6e4c83..c49c706 100644 > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -886,10 +886,10 @@ static inline int wants_signal(int sig, struct task_struct *p) > { > if (sigismember(&p->blocked, sig)) > return 0; > - if (p->flags & PF_EXITING) > - return 0; > if (sig == SIGKILL) > return 1; > + if (p->flags & PF_EXITING) > + return 0; > if (task_is_stopped_or_traced(p)) > return 0; > return task_curr(p) || !signal_pending(p);