From patchwork Thu May 7 15:07:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11534231 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A5331392 for ; Thu, 7 May 2020 15:11:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78AE32073A for ; Thu, 7 May 2020 15:11:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Yr+Vmi6Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78AE32073A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8432D6E9FA; Thu, 7 May 2020 15:11:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 388FE6E9FA; Thu, 7 May 2020 15:11:01 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id s8so6841608wrt.9; Thu, 07 May 2020 08:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rLELSkIkXqc4MjKeYvGm92qJZ3Zy9onyXpkjbBhy6wg=; b=Yr+Vmi6QKlnofxOYiNtwd3eAoXde2UhusYr5PcDyQb5Z0Q9cLezYKD/VJtzOzfR5xu fd19PV2zRLEhANF8hyKJJvBU/zWK/xen+TJ8UZbAdaFqN20+qNCke0BmfE042HaBY/p3 EOWFnlGN9cSqctiNA8dM3UnFj2LjE8W8K91UFnP56MkgmmwkmT4L2n8aos6fSsfPWM/T yDzb1ZUpi/+1byj1vqHXbCaN/Cq1l0+3Gi8+CCGbZbII8WNsFvimC7QW3bskOuvA4xAn 7F2L0UvG2ZRdp6SNhnTL8AJHzvPFH8kzdoIgoXV/QLK21JGlkG22hwcby4W58H0ngVKe DhfA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=rLELSkIkXqc4MjKeYvGm92qJZ3Zy9onyXpkjbBhy6wg=; b=QOpy9+8n0/TXtAvfceDacO6XlJTODGtNvEzdKB/Il1GJvT0BcGpzxMyK0ibTxk+KTs COs3J52VwdZ9WaImV+dQZUwgHK5Ckip//mwqGR9No5GHEvJMqMYGqnTjspF2Url4A+C8 oDslHKGI15vg2CFOk5+CwE0PNwTUnA8h0AbbPnHok+zKe+efjaDzPXH1ILafijmRHQGt Ydb9VFe7yxZpB1XdMATtjx52WekQoLbIpsDwLFVyE6DVIdf7H3Ga04XE2eLqDXYAfU6C /ykpiZChUcJEKRF5Sq0W41xkerQaQjMZKsacfjrOOeY4W3XsPSBquXCp2/8P5QQ/L0zl dWjw== X-Gm-Message-State: AGi0Pubqgv5TnWMAf+rkO4D4vMPlyt4iuOCGclHAcBuKdFLc2T3AOyZ6 rCHe+FmtZ+JVC8ETZcbiQN+EYQj/ X-Google-Smtp-Source: APiQypKaNSaGj3/LMepeWJU0dApnhwNxtE8TWXTJaCbSNqB3o/LoIfwsHTqlbZro+OBCI6xtsDPPag== X-Received: by 2002:a5d:49c3:: with SMTP id t3mr14981243wrs.94.1588864259352; Thu, 07 May 2020 08:10:59 -0700 (PDT) Received: from arch-x1c3.cbg.collabora.co.uk ([2a00:5f00:102:0:9665:9cff:feee:aa4d]) by smtp.gmail.com with ESMTPSA id b66sm8704247wmh.12.2020.05.07.08.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 08:10:58 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 06/36] drm/amdgpu: use the unlocked drm_gem_object_put Date: Thu, 7 May 2020 16:07:52 +0100 Message-Id: <20200507150822.114464-7-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200507150822.114464-1-emil.l.velikov@gmail.com> References: <20200507150822.114464-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Deucher , emil.l.velikov@gmail.com, =?utf-8?q?Christian_K=C3=B6nig?= , amd-gfx@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Emil Velikov The driver does not hold struct_mutex, thus using the locked version of the helper is incorrect. Cc: Alex Deucher Cc: Christian König Cc: amd-gfx@lists.freedesktop.org Fixes: a39414716ca0 ("drm/amdgpu: add independent DMA-buf import v9"): Signed-off-by: Emil Velikov Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c index 43d8ed7dbd00..652c57a3b847 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c @@ -587,7 +587,7 @@ struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev, attach = dma_buf_dynamic_attach(dma_buf, dev->dev, &amdgpu_dma_buf_attach_ops, obj); if (IS_ERR(attach)) { - drm_gem_object_put(obj); + drm_gem_object_put_unlocked(obj); return ERR_CAST(attach); }