Received: by 10.192.165.148 with SMTP id m20csp4797398imm; Tue, 24 Apr 2018 08:33:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx49vyVO71767ZvBsX3D91n7sx72b/uPWFMjSt7oeiUzglbAhBaEeEOIWWGwDvaSFwTSuqe3M X-Received: by 10.98.91.71 with SMTP id p68mr24451675pfb.128.1524584013424; Tue, 24 Apr 2018 08:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524584013; cv=none; d=google.com; s=arc-20160816; b=0S7bC2N2Lsi0k13WUK3DXXymFmBFm9jRLQAd17QvIFmrlGCl9BaRcxahaYW5HDsgdQ jNZjJc6zLI/EKm+qXEGwjBAZY2P2jD34bG1zSWgCWFEu+PgeS54VVZDQezBnRSiPba6f EfSL9EbfejxF652Q92hJILE5IekznuDTeTBD5ux2OrPrZqbvqi/r7yQI8eo3z9JOxR3v Bo+chxhiA43h9j3baogVx7DphwaczdIZw4yTeurP1k6gr8MREhuIL7Ul50ALmM4Wou/Q klTN4jQMJANn2obema5XTYcNbMR2+SRaBI1huE6mNtD7VEQk5xXLK4QfSVOsbG3XBX0H hkYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=JEvt+gfyT+MCSKh4j2Dqpz8vdhZlch1umPKlwlCVK5g=; b=geIVfc0csOG8fX4NRIlUOMuxrBwoVTVIwc3BpVFgNUSjHlgbQEx9F0ToWwEeL8qwlP 63y7VJTavyRJKlicU43KNHmzv/xAHxK4VxhWzA4uwhL9OXPl5w0R35kyt5XPb959gJWo GWSVl7Li0CG+ZiFY64c0tuke706Foc+mzFvRSl+VY31GzIIPPsLprX4bq8SR9312BwHa y4ILdd1RtlBxFccno8HWy7PKiXzCQNBStB/oR+9JMAa7O9x2wu16d+f+Tvs+NrdpfV7H Lm4w0TI0HPPA/xycgLEnaCV0AlmTrdrgz+tjQnEQsl2LdqGK4RJ6EzozhRDdR2B9eVvF 36QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=0bB4+YQL; 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 66si13793044pfm.167.2018.04.24.08.33.18; Tue, 24 Apr 2018 08:33:33 -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=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=0bB4+YQL; 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 S1751574AbeDXPbj (ORCPT + 99 others); Tue, 24 Apr 2018 11:31:39 -0400 Received: from mail-sn1nam02on0051.outbound.protection.outlook.com ([104.47.36.51]:49750 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750882AbeDXPbe (ORCPT ); Tue, 24 Apr 2018 11:31:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=JEvt+gfyT+MCSKh4j2Dqpz8vdhZlch1umPKlwlCVK5g=; b=0bB4+YQL3etQDw0kM+I4y6l5MVkzs6MaN2aSicPvx0RXxGYGplQ3/JkOc6XXSeu8Ga3MDMESiZyXw8Mj5geveOF0xGEALRR05NBpoNlgVLnJpMoW28B+9kMB0s7/L2PTVrfd0Tu6rvbM2uR83GeXatCrpn+Dtv5Ix34rxnY6vmE= Received: from DM3PR12CA0057.namprd12.prod.outlook.com (2603:10b6:0:56::25) by CY1PR12MB0328.namprd12.prod.outlook.com (2a01:111:e400:50fa::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Tue, 24 Apr 2018 15:31:32 +0000 Received: from CO1NAM03FT026.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::208) by DM3PR12CA0057.outlook.office365.com (2603:10b6:0:56::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.13 via Frontend Transport; Tue, 24 Apr 2018 15:31:32 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT026.mail.protection.outlook.com (10.152.80.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.696.11 via Frontend Transport; Tue, 24 Apr 2018 15:31:31 +0000 Received: from agrodzovsky-All-Series.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.382.0; Tue, 24 Apr 2018 10:31:29 -0500 From: Andrey Grodzovsky To: , CC: , , , , , , Andrey Grodzovsky Subject: [PATCH 1/3] signals: Allow generation of SIGKILL to exiting task. Date: Tue, 24 Apr 2018 11:30:34 -0400 Message-ID: <1524583836-12130-2-git-send-email-andrey.grodzovsky@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524583836-12130-1-git-send-email-andrey.grodzovsky@amd.com> References: <1524583836-12130-1-git-send-email-andrey.grodzovsky@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(39380400002)(396003)(39860400002)(376002)(346002)(2980300002)(428003)(189003)(199004)(336012)(186003)(44832011)(47776003)(26005)(316002)(76176011)(8676002)(36756003)(126002)(110136005)(7696005)(356003)(54906003)(4326008)(59450400001)(81166006)(2906002)(16586007)(51416003)(81156014)(6666003)(50466002)(86362001)(48376002)(5660300001)(53416004)(486006)(426003)(53936002)(476003)(77096007)(68736007)(6346003)(11346002)(8936002)(50226002)(104016004)(105586002)(305945005)(2616005)(478600001)(72206003)(446003)(106466001)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR12MB0328;H:SATLEXCHOV01.amd.com;FPR:;SPF:None;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM03FT026;1:Pi8SG7c6KeWf/irKi15utoBCdjzBNvjQl/HEsy/KZE85S7Aptr2wO8kaCeCo/YqxdKJCDUvcyG4kCNXdaXiaVnqFCWz8vkVKRK72bY1avuvLIS6KwmBqV1EYuMtzehFC X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060);SRVR:CY1PR12MB0328; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0328;3:77ZD9tILatLJ5HZuA94Plv4yXAVSZ/i2BNVhU8P9v16qJ+c3plbUkC51oxXc5mMwDaH2RqzE7BsNRoAstDEgMhcwX83XPNidT00SoXr82Ia+N/61KFk70mQNqDBflsNBWGy3g1m51b1fu6DRu25NqJYpVcALE8jiu5LtEKE0ndzMpvtf6ppjYIDQ93J7JglvTOhNewL8PxVPajF+NEHe10P0W8eRChQKqjDHo6CfmfneLvAgUUN7iKxBNxtbBnpqTHnKSAghMk+n7ophpwILCCmrFZQJI8K1ZiXyoP8b/fc29wP1sDl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7GVnVUecqXWeTSTaNp+39bDCGuNz0/iko7AFsxOKV9pA1LinZBYtZd51IOK1EIkb/QadSUb0IYUK1/7WL2Lov7226eCIR6gBTwhbp4J5Hl+zahd6A6AQ2//mdBRPtV11287BiblSFpzs X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501410)(52105095)(3002001)(10201501046)(93006095)(93003095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011);SRVR:CY1PR12MB0328;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0328; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0328;4:CK7zUYzkh2i9IpJMXYfEhci9gydqJ67Y3G4s2/w7wwGM/MC4X0uv3wJFLmraJ32KUhqvkDxziNeOLdIIyDZj7oetScUW6QLB8yDVhXQMwlERiMuVRXPcSS376AkdMDvloVAbvvuaRYY12LxmbGeJvRHH6aO97KPDLoZap94TxYQ9rX34IQcuHVHIUGCPbcxkqRdYm2nFiEk6reZMrg2sj668rhePkPSKZgcrYANYCWbuAcG/CleJAsATpRutR2cCs5GVtP6kDR+sEkB8sfmv/l2ExRaRv58jhqAARtAMcHl5tzqn0j8Tu1jugsgY8QFp X-Forefront-PRVS: 0652EA5565 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR12MB0328;23:OsjwReTJMAEUFW/7UqOPKnb3eVqjstXVWPuYixsL6?= =?us-ascii?Q?BBMVGVhr3J3avVsGxnJmjCSHZ2j/eSGwNkT+0u0jx7Pi5U765LPt2PqUkPzF?= =?us-ascii?Q?KFvqd0t7xtJUkSuZqWRscx1pt5In2qRsvc5/Ii5jLu5HCrfSRk2Y96Cx1TCH?= =?us-ascii?Q?LG9ldtYHmDkRBTX9URa5dIdiqZoaGQ0+Si2BPbLijYr+MEZ9SqMhDx7mGHq4?= =?us-ascii?Q?3Symarj5iLL1pp6/CgFPzxkISE1lkZZdWJsIEBmsWh7qA7QeasMc1/zjbcVG?= =?us-ascii?Q?wvlRElscSywORdQcDC7VnTyKhVFX1gfm1uVTUfzsWCQzukQe9faf0ysl1mVJ?= =?us-ascii?Q?7ohRMKDqXtTlHT+W6v27LJYkmQMqs7orf36o+IlLPvum+rgpYZHHQpoxhx8C?= =?us-ascii?Q?we8p7l911Gtq1IJ5Em9YpOlYRhchCj8BiBkz8MgTfXnnbC0vK40k7jW+oybT?= =?us-ascii?Q?xFXhhBnSTeW39liBhKY7z4upqQf7tIwTLzALMm7dPAgifqHwQ2uCqd/ocgwh?= =?us-ascii?Q?hXa0s7tlb9JMiJH91zyjNzDY/MjvcT8QYamGLbbkjdyF9fnRs4kDDDq1+8tE?= =?us-ascii?Q?G6PCD9jeJzzVqUs7dOi954cRFzER1huXH6NSQ+EdnaEllmpOQSQp+oItTps3?= =?us-ascii?Q?+Yn44TLM0dCsWII/Qy7EPraWcTVs2hN059oREtnPlnKfJjNXhwiP95bLMxzv?= =?us-ascii?Q?opFm3726tNTSnSnf77x0scxCXdO7lPBSRswnueDWe9BNc1grbbLaaBK7G96T?= =?us-ascii?Q?acWsfWfWkHOVLm0gGRnPAyfaQEV+N7G9pcgaI5D9zurrGBuDtu/AlaRydon2?= =?us-ascii?Q?J2K+WNCI2sMp0Zvbrr0bik1r6zhpJt6d5nf4QgMMLKeC9hhPK7y91yY4vpQt?= =?us-ascii?Q?xlL/H1fN7/VRGwxchj7nb5ONJuJyfLJc6c+xgmzINM88Yl2vE/kbd8GVxQih?= =?us-ascii?Q?rEeFTs9hV1InnTaovVQnXKOw/VLuVYLkV6S09Jw9vYLlV+oDzLESGPyNxsUz?= =?us-ascii?Q?W6H4rz5U5+o61TqeMhan5vVwI31kqNA3uFi6/dteokgqPV97bfAIq7XAzAAb?= =?us-ascii?Q?w6icnH7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8MuFk9tH9IF9t5AnSvdKGc+9V0karASIWSltQ=;24:nOW/UeTixhSyE1uze4XzZkF6aZHOv4znXSbMIwkQirHhf/YIkI9lJo2c9YPBXCSXQGgYjmsEsk5nF5+m8GweZKSkLdB2RjCHbZ1TqrBLfqU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0328;7:aWKcT4fhIPbElWL8ACKI3Db9/hTlVkC6h+skddovFp/V5jgMR8z6+sWGH7wHLmeMKOljwihndsav+ghS4gs4gnOYI1H9EDUeUt2D2Sskk6VUBdqjAENalWpiF/tqN+aLQtX7W4RuWomM/rJO2H/OzBep3OQESN5/UTKpWjT49Nf9EKtboMudpOJu2JQMKrUdRU8695uVdgyj6DecAr+0WqwENPrDyTQqVLu5M4w0iFf4hx51gaae6A3Ey7CPA8g6;20:/kP7LXDg3gY9E26Sh30xn5BaL0AzgfvsIpZP2yjBlld/ku1Rlpl/3+mS1b5yh+NWEejH43uMdya3aKL9HY8aE2WPjOGGRRPV5qw3AiXl0fGU1oOC8JKM+S9GPJxkzkwurIoRyUXm3azrZ2q3Pc7f01+5G70G2DPuikRz+cbK/B5j13hW8lxiVUFVjEM8oKe/MIDwKmlxBI0rhoMCpfQPO/fgnkl6jGBUZmCHYjzQkUDZEfw5zkVumjMbtRXQV8/5 X-MS-Office365-Filtering-Correlation-Id: 294f4c28-1ffb-4022-f3a0-08d5a9f874fb X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 15:31:31.9633 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 294f4c28-1ffb-4022-f3a0-08d5a9f874fb X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0328 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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); -- 2.7.4