From patchwork Sun Jan 22 18:48:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 9531435 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 D512460431 for ; Sun, 22 Jan 2017 18:50:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B478027F54 for ; Sun, 22 Jan 2017 18:50:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96A4D27F99; Sun, 22 Jan 2017 18:50:28 +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=-3.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2487827F54 for ; Sun, 22 Jan 2017 18:50:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 903A06E34B; Sun, 22 Jan 2017 18:50:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 32ABC6E008; Sun, 22 Jan 2017 18:50:25 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id r126so20918618wmr.3; Sun, 22 Jan 2017 10:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=W4DgDrlmZ40znjQ0dEsTIwiSYSbNfqG4I9XGshbGLjs=; b=lTW9Ia3cvu13EyDVFWpa9HNdjanYMtMPtfiFmIZltjCeb9+AmHgCpVcGwLmDOdTfDd Ugqxiqti8e+TcE9a53asNOuVsPo8gU6njuU7K1TOvySlm8yCqTELhzj1PPdtIfVhPQeG V/PizBx28qmGCejRNny1luQt4YdATMZRslt08bwaBX0CWVtMlxmTTWO+LZiLj6scthgz IGvMW7M0BhipgzR4mp8bf9E8gE9hZ7BVCkytDUqEJ/niOoI/psRl5VQV6lKUjAz+naHn fobA8EiOI8Zmd3Vn3HvHUlvY+sG/OM86SFwqhxpmY9YT69sybAaakssFbe24WDIFH1AZ +qpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=W4DgDrlmZ40znjQ0dEsTIwiSYSbNfqG4I9XGshbGLjs=; b=Zgs1cnNx/q2vbBRFUJb256ToZgpjus9VKM62EgLVaiXTlyuvOlDuHQ3DTwU0UrgTkr 4vZ82b5zID3A/IBcSDHC0fGxKWcr6SHdxnrKa2VV92V4rmtU8rm0qLgXe6bPCxEW+r90 oW7HBiT5syjxvAc5doJI9GxuY7V5qyeVehecg57fEE+mfxDV2muRccRNfLWQMhWRLZOw Mfuww4xpKRcXcO3h5lsmxGlfETjfTvZ/SRbdnGKt06L95w443FfOxNsKvWXC2W3oiocK ARW+9hITFsNtYzXnZF+uEMtG8fYGI5DmZJCBWBo2Upm+1aL/Znj4zUx6mupqumLA64Ld 2t/A== X-Gm-Message-State: AIkVDXIS70s9FdY2XGVOpCePYakpSGKe+MRE3mRO1Y7C96kzQ9KZLEgsRIpxmcf0OKd3jw== X-Received: by 10.28.111.155 with SMTP id c27mr9035163wmi.18.1485111023854; Sun, 22 Jan 2017 10:50:23 -0800 (PST) Received: from localhost.localdomain (cpc91186-cmbg18-2-0-cust67.5-4.cable.virginm.net. [80.1.50.68]) by smtp.gmail.com with ESMTPSA id z67sm10732776wrb.49.2017.01.22.10.50.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 10:50:22 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 1/3] amdgpu: add missing unlock on drmPrimeFDToHandle() failure Date: Sun, 22 Jan 2017 18:48:11 +0000 Message-Id: <20170122184813.12995-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.11.0 Cc: emil.l.velikov@gmail.com, amd-gfx@lists.freedesktop.org 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 Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Emil Velikov Reviewed-by: Nicolai Hähnle --- amdgpu/amdgpu_bo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c index d30fd1e7..c9f31587 100644 --- a/amdgpu/amdgpu_bo.c +++ b/amdgpu/amdgpu_bo.c @@ -302,6 +302,7 @@ int amdgpu_bo_import(amdgpu_device_handle dev, /* Get a KMS handle. */ r = drmPrimeFDToHandle(dev->fd, shared_handle, &handle); if (r) { + pthread_mutex_unlock(&dev->bo_table_mutex); return r; }