From patchwork Thu Jun 23 18:53:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 9195769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EFA236075F for ; Thu, 23 Jun 2016 18:53:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E11EB2845B for ; Thu, 23 Jun 2016 18:53:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5DCA28467; Thu, 23 Jun 2016 18:53:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C10602845B for ; Thu, 23 Jun 2016 18:53:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 713676E3DB; Thu, 23 Jun 2016 18:53:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id B7BD46E3DB for ; Thu, 23 Jun 2016 18:53:07 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id 187so13273479wmz.1 for ; Thu, 23 Jun 2016 11:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=v5BI8IpwyicR7vwF28IHTeW1LIx1QvhsQm+301W1zw4=; b=P/uwUuXLySFJ6CpSmwFkoSV19qEuz+bbmiscIiebf9yqqSWivqXtsdeckRoKX3+Mkg oUSpWf9jz2pOfXLDCkYk4G8A3TthIs4juohximIQXc0lwkPMbcs80lAzzlOnxE72YYsg R2mMoCIh/XPr0JiQ8yU90NANyTc0tt8NBr1skATra9yWaZipL144LXguUeD3uBQFQjms 4PGUTaoxO4ybAVyUW188sLr8/9/EZwTV5E7Tk8hnyAXnyuKsJaM07mj/s+L2JEkALcdh DqK/1LDFxAYzhRZgElMe7EWlUOtFCiuKCVBviAY4yU5OlFYHG4zkejOCMq5JADb5vegq tPbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=v5BI8IpwyicR7vwF28IHTeW1LIx1QvhsQm+301W1zw4=; b=c6y7sjj4Tnl9jT5yfRhbQJEd3YmNZ6Vaw+hZEnKz6WtaLAYJVQVhs8lDxYnIvWsqMS f/cXeBmKjZCF23g2loSvZZjCYFZX7su1mEWWF3L3SKsLDSYDx0+HcjiC339D2CkV+6Lw znKPQK2pfP5iW+AK4XLdXEN0UFDUeSad0wW5F2FNexAU6iasoiZzzfQeSoQOGqjFUJcJ VS4hRrrLXmoKw1EJamhKFEJyHSPfHFZIQBIFA21EZMaJ93RO/7O7doS7pIziSdtemjf1 kEGfFLnthDWnqqw22I9n1b3h121oskaRQE2ANxQoKPwh3HYAWvWeAfVcsroIciMZqnJx LfIQ== X-Gm-Message-State: ALyK8tJautCExRY6kelAqY5LasmBuvbMa3vjXGTAxGNK+J47yEtapmTKNvlOrQN90MdE6w== X-Received: by 10.28.38.5 with SMTP id m5mr15046187wmm.82.1466707983885; Thu, 23 Jun 2016 11:53:03 -0700 (PDT) Received: from odedg-home.localdomain ([87.70.55.254]) by smtp.gmail.com with ESMTPSA id z5sm5141624wme.5.2016.06.23.11.53.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 11:53:02 -0700 (PDT) From: Oded Gabbay To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/amdkfd: destroy mutex if process creation fails Date: Thu, 23 Jun 2016 21:53:00 +0300 Message-Id: <1466707980-834-1-git-send-email-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.5.5 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index 6482fee..771a18a 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -323,6 +323,7 @@ err_process_pqm_init: synchronize_rcu(); mmu_notifier_unregister_no_release(&process->mmu_notifier, process->mm); err_mmu_notifier: + mutex_destroy(&process->mutex); kfd_pasid_free(process->pasid); err_alloc_pasid: kfree(process->queues);