From patchwork Sun Jul 30 20:27:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Engestrom X-Patchwork-Id: 9870671 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 E3FE760353 for ; Sun, 30 Jul 2017 20:30:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D72DA2852A for ; Sun, 30 Jul 2017 20:30:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC2302856B; Sun, 30 Jul 2017 20:30:22 +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.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 BC27928589 for ; Sun, 30 Jul 2017 20:30:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A92F66E360; Sun, 30 Jul 2017 20:30:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94C636E33D for ; Sun, 30 Jul 2017 20:29:58 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id x64so9109092wmg.1 for ; Sun, 30 Jul 2017 13:29:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=WtaqrhFrLviTFIY1fXhz4sxyfmWFn9k1ZQO84gbhR7w=; b=izTfl9n+PbwpPJ9Noc+YPlf+Xxz6gyhrbf8R4Tygh+Kb0yrB0Le9CsxxTsSAm0gZC9 SC69PtB59RhIom7eXIXCJ54gSkBXN5pvetdNR4sIFNcvNHTFXwj87mKhSWQqOIB3FTZ3 ypcxTU3C8rGiOzgzjbBN79OWYEcUhk0BvaVUej9UlOTUQG6WJo1cMc7KXXAH3JucDjC8 rRhZjGdGeWYqcoQNEvLCQMl5mbQm/WKiKGnqqHbDY99zEGdnGVNk5rhDQD3tyH8DksqG EmnAt1uE0R4PXaQ3vQWUF8pciaZbQlX8yuc56Bkf5Z36RY6/KgOoyPsxSD1dnVkADJri qcRQ== X-Gm-Message-State: AIVw110xF3PzRVT0UesD9pykUCdqbFmziRWgGjz76fEYTPEI5EZilFSL nZ4YlG6biYshezshVM8= X-Received: by 10.28.224.197 with SMTP id x188mr8797197wmg.99.1501446596763; Sun, 30 Jul 2017 13:29:56 -0700 (PDT) Received: from localhost.localdomain (host109-145-147-240.range109-145.btcentralplus.com. [109.145.147.240]) by smtp.gmail.com with ESMTPSA id 91sm27300320wrg.83.2017.07.30.13.29.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Jul 2017 13:29:55 -0700 (PDT) From: Eric Engestrom To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 3/3] freedreno: prevent deadlock in error path Date: Sun, 30 Jul 2017 21:27:40 +0100 Message-Id: <20170730202740.27564-3-eric@engestrom.ch> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170730202740.27564-1-eric@engestrom.ch> References: <20170730202740.27564-1-eric@engestrom.ch> 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: Eric Engestrom --- freedreno/freedreno_bo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c index 10949ebf..7f8ea59c 100644 --- a/freedreno/freedreno_bo.c +++ b/freedreno/freedreno_bo.c @@ -138,6 +138,7 @@ fd_bo_from_dmabuf(struct fd_device *dev, int fd) pthread_mutex_lock(&table_lock); ret = drmPrimeFDToHandle(dev->fd, fd, &handle); if (ret) { + pthread_mutex_unlock(&table_lock); return NULL; }