Received: by 10.192.165.148 with SMTP id m20csp4798285imm; Tue, 24 Apr 2018 08:34:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+A/wwJ5V91b91BAFtGmEhf5NdDuuNbuJBJrLggU7jakOyo78p9E+4lXV/TOIljhNv4A/HY X-Received: by 10.99.99.196 with SMTP id x187mr21007652pgb.154.1524584060634; Tue, 24 Apr 2018 08:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524584060; cv=none; d=google.com; s=arc-20160816; b=iIF7bw0Y6gZSNDcFmbO9/V2GjgVdD23DYtHJUjkQbtdP2GQTCDvRvrHvTko135HCSJ XIDKlDPrk9cHH8HV8SEG1NizidJfNtOInckUu0VJksngBOqc/anMW8TuS9Lb+CVgsBn9 yBhYLgqHfqypQ6S0IGv8ds1u2Jna9xVQzLL0mAQ+eUJXip/IBocUafS4DJJbrOdVfqs4 tUo1fBk9ce3cmwHGseaZi53oTRdEL8qRg7jNdCDHs8dHhv2ISmxI/unQOxT/n2kPuFMR XTE8AEl2c3V0Yrni6hw/sjPY0cExZPlErNwyHWkICjIxB8SXuOdgi2RPDrCGZSuZoYEf wyIw== 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=ki0xYl1KYeYjznAy6lnLUarkbT3v0TKQPmDOHqC9Fcs=; b=YhzmULFYVEJnkHdtnCkkZoUGBfARKF1ZGJkkkTrszBpNOUUkLXSKg6wytzbYOZg5hm mSR7yMF4IWVWyAlVdE/QPusaFzlFhgjE5vvNlh+V/IHv+KuyQbjKXIqMMmujUJJfrDou 1pt9c1YteSmb6TSPjPIDPinujHIqEPjEEGgTS0UrN9ytbMh1XMvLhXVWmlcEXD/2Obbw JhGx8aCU6W5uQzjTWoeInOs9m53N4xPXuhVhTne+gI1kyCct1D5iNxyq53oyr0W/7Ges 0SDegIUx7buKtoO118JnhUQROXXluWYuEZhG1lTjbBVcjXTo4Mz8RG92BBHgReUzjZ5r 0rLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=xO3ImsNN; 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 h186si12019663pge.324.2018.04.24.08.34.05; Tue, 24 Apr 2018 08:34:20 -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=xO3ImsNN; 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 S1751603AbeDXPcO (ORCPT + 99 others); Tue, 24 Apr 2018 11:32:14 -0400 Received: from mail-dm3nam03on0048.outbound.protection.outlook.com ([104.47.41.48]:48821 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751216AbeDXPcK (ORCPT ); Tue, 24 Apr 2018 11:32:10 -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=ki0xYl1KYeYjznAy6lnLUarkbT3v0TKQPmDOHqC9Fcs=; b=xO3ImsNNEzq9Ub5Lg4zGgYUwOADBLVTBBlBvGU7UJL6svCWzlKP+R5EAqOlIj2hjieu9kzn9HJT7kWNWOedEEhbVl9To/ICmZyl+fjMj48FRq1/4IQA8uaRbQhUGs+D/c5wo0iUAFA0tsci8iECNTW2wFLICHbZPRmI1RWzzHYU= Received: from SN1PR12CA0112.namprd12.prod.outlook.com (2603:10b6:802:21::47) by BN4PR12MB0753.namprd12.prod.outlook.com (2a01:111:e400:59bc::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.12; Tue, 24 Apr 2018 15:32:08 +0000 Received: from CO1NAM03FT036.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::202) by SN1PR12CA0112.outlook.office365.com (2603:10b6:802:21::47) 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:32:08 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; linux-foundation.org; dkim=none (message not signed) header.d=none;linux-foundation.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT036.mail.protection.outlook.com (10.152.80.181) 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:32:07 +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:32:05 -0500 From: Andrey Grodzovsky To: , CC: , , , , , , Andrey Grodzovsky Subject: [PATCH 2/3] drm/scheduler: Don't call wait_event_killable for signaled process. Date: Tue, 24 Apr 2018 11:30:35 -0400 Message-ID: <1524583836-12130-3-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)(396003)(346002)(39860400002)(376002)(39380400002)(2980300002)(428003)(199004)(189003)(110136005)(126002)(53416004)(104016004)(305945005)(50226002)(4326008)(6666003)(86362001)(8936002)(44832011)(50466002)(8676002)(47776003)(478600001)(81166006)(72206003)(5660300001)(2906002)(356003)(81156014)(36756003)(316002)(53936002)(54906003)(16586007)(59450400001)(97736004)(446003)(68736007)(26005)(76176011)(2616005)(48376002)(486006)(51416003)(7696005)(11346002)(106466001)(476003)(426003)(105586002)(77096007)(186003)(336012);DIR:OUT;SFP:1101;SCL:1;SRVR:BN4PR12MB0753;H:SATLEXCHOV01.amd.com;FPR:;SPF:None;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM03FT036;1:2pcY6MRsrLHLuS/8MuwNobGSOpwIjQLUJJ0w2gTSn66wePSK4T68+tTqytIDG3drbyD+5MQdINh3CaGGV+tvAaxV64pmK1XFUurXMlPA8/C0A3eleE5V4LZXvvrCQRk9 X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060);SRVR:BN4PR12MB0753; X-Microsoft-Exchange-Diagnostics: 1;BN4PR12MB0753;3:XkXuU1OUjpWqIUUfHy5qKmpp1hbYIqkja9xQD7oY22BiunXmPTTWooAoB2vkT5dNoIryoelCQQrXRRjCpCcOH5xsp0i5qEwfzTJi6jD8MW1bE+lxj6s8WvNzmEhpsZEf6jOUNzaABWkpALQqB/AY2R25XSx4XCioFk3l0osvJmmWZ9NexSChHyPMJtnXRcTIwMn3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65nczYxCuweZexmQ0HvTpsNCupj2A3j6Rrh4pKzy2kx3Ke3VK4qkvy/bzZLPNmA6VwCCNQGeJuZbHxNKeAQINbyTVUu/ZGWO3nKMBo3j4+Uq/w/j0gKTiW5rhb1F+F1IobSN7QQuN/yiR4y5H0aOKJDIy9j+jEkPJBlxq1Oz3wR/eczsBiPFL3GkAamReO+kITj1f6cFUf3x1hfxPlLQE+oOMqGiYZPpID7ge7nrrKcdfpops9Z 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)(93006095)(93003095)(10201501046)(6055026)(6041310)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:BN4PR12MB0753;BCL:0;PCL:0;RULEID:;SRVR:BN4PR12MB0753; X-Microsoft-Exchange-Diagnostics: 1;BN4PR12MB0753;4:XfokH5pl7/CKvmTIFLJP9hIXq8I9fLlZoJIosucyYITDTvXAwHj6WhEdHO4f2y7YB4Q6O9KJTsmWOV5u3vTpE4mkqXyARwLDOlC/LoKOY6BcblPmnphYP+7I7xxIZOE6jeFBpbujUCTVOQ4TYkJMKsduKhSsW38UNjXZHkfXoJpfGrVLALM/wuRnF7v1E8HXMafgYXsVJdN1gvwRqASMB7qrmV9WvkEFMZBpW+JBynVdutdX2E/1t1QLCiu/N0x3PXZH9pPN6RlDKbwlkYjZ3Wm9vSSXcucGqwA3b2CzXRIyhskyNR0xTwlKIKPvprAT X-Forefront-PRVS: 0652EA5565 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN4PR12MB0753;23:ZLoZqDWQ89LuJ14CpqJCR7rHd68G2/RIWyyzqSMDB?= =?us-ascii?Q?VcTdh1JnHF9SOTjMNYgoIJp1qkcdRWKj9HfhDqZLjz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KCxoyg/+LyQQYqO58XDMyB+m7buap7/Tx4KwdJANeMkiEMkC9E8OlHEObBUxTcrX7D/Qbu+dj1AmB6ocdasJUV4ZUM0MbHqFxMpFRbuVrl8YnokisjlMaOHEd9MS+2V7Y8=;24:jDfDM1hkQ9Bu0pB6IvP3pHTsDaKmj1z2NpZUXlgqdfy0DXNoXQ0TSdNkEygQCJv/P73p3MqZkksXLpLRuGXYso65zSCFAhrB4gK3ANJgSJk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN4PR12MB0753;7:BsdNIjjKWJAIKAbvJBNwF0P4mNG+NtSgQtNLJwkCyxoo+PAILWdLAhmxLIBKsq+h/droLfWahShGPtp1ImQqIUTAMYtNS3gmJa72RNcAYVn9RM+HoI0zPWThGiSJXSkyz3H/0XGM5mryBO3SnCBcpifoTPJE7D9s1T09EvryyRnPyanQDcyeMKYRSBM40isfi6DKCG4V4D1sOUasV1SPWvJdCPEeXbKcgTWabaGYoesYbiBsU+acNNf8mNA6X3BU;20:c1cpEaYF/NacuBgE+XT622yQobAT7M6RoefpTCB0bCowrqk6McxRoZmXpMUQdSa3wA9iCDBj6UMZNt1HTDy8Dbmrrxcp8sWjFr5+pHM9AAjLKJDgCODXmZUQeZUeb00pA/EAWZy7uDCfF1qhlsTtWxZ07WHAssa5N2zVUPrS6StLBcJBLssa57Joyg0OYuGUJ7f6STaBoo/dxJVdUjnvTDOyneh57FlJ+YCC6pqhZBLKr+AD2N0sTha5hvXCzd4Z X-MS-Office365-Filtering-Correlation-Id: c439b9dd-65a7-4ef4-46d5-08d5a9f88a38 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 15:32:07.5595 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c439b9dd-65a7-4ef4-46d5-08d5a9f88a38 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: BN4PR12MB0753 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid calling wait_event_killable when you are possibly being called from get_signal routine since in that case you end up in a deadlock where you are alreay blocked in singla processing any trying to wait on a new signal. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index 088ff2b..09fd258 100644 --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c @@ -227,9 +227,10 @@ void drm_sched_entity_do_release(struct drm_gpu_scheduler *sched, return; /** * The client will not queue more IBs during this fini, consume existing - * queued IBs or discard them on SIGKILL + * queued IBs or discard them when in death signal state since + * wait_event_killable can't receive signals in that state. */ - if ((current->flags & PF_SIGNALED) && current->exit_code == SIGKILL) + if (current->flags & PF_SIGNALED) entity->fini_status = -ERESTARTSYS; else entity->fini_status = wait_event_killable(sched->job_scheduled, -- 2.7.4