Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2663986pxa; Mon, 17 Aug 2020 15:56:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydw5/yIBrjeV0LgiwJKew/VYu/VR1X4Rc8O5gdi1gIjYQRiZ/ELtELGCBoBlGw2rmO6N84 X-Received: by 2002:a17:906:7e0a:: with SMTP id e10mr17057226ejr.312.1597704996633; Mon, 17 Aug 2020 15:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704996; cv=none; d=google.com; s=arc-20160816; b=WOVY7LxRv1UoN5Mc7ePe5x4V/OCCn/QXBY3hsw5ubGl36NlAPPR0hk39Ol2kcCuj2T Cz72FyiTgsTrW0zG5ZzP6HjLnRpBAjAW3UhA0v/huW0rHDvVFCA6Pwj9hg/N1y3EQFIl znR0NZgaoqHCZGP/6z3McN+3h6bWQV9P1YgoXiLTglgUAoz1QGAjfyLrgD6rPLbkgXDz HJXM+O7qMyeJCzCXLCzBgRSrQ8LAEBrHBjwTgXdTdlAGb1yncGa0JZOIDsZtyfodwiOx ni8cCLriXWOliqr4w83ikG1nGh4xMXin49f3HQdQw3vFCtyxEGNziLz8xYGKIBpXNcD0 GMHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6cIp9fITRVkX9MV8l1s9C6+xpELug7YWQ8sl31nReU4=; b=gnJWz068sPLrD04Laycj5K+NuGF/hvqpMOfses6apBg5E2yX7lzmKrzTMiODV06o8m ETUMafLFPDeLXbxtpabLH25F+lOqYrW+bf8THflm0SXY/fPNWQB2jzR0MhbGFkByRkKs pTmJ6ch2hDJeq0aHRkXf3fYThm/fyq/crTsQet173Aub1Asz3YjYa0gml4tE4ckHPLJG BV3Dncyk4G2cxooAdDRh8W+9KowmI4RZehWLxvL861RyKw2ASnI1JbnoctE3QO5osHzR 1J97A79ReoSqAMHumU/oPPHxXEz5APbVVJkvpARu5pdkI9IIuAhc0iOF/huRZC17yaRK MFVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nQic9FLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si14953652edz.404.2020.08.17.15.56.13; Mon, 17 Aug 2020 15:56:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nQic9FLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729868AbgHQTl4 (ORCPT + 99 others); Mon, 17 Aug 2020 15:41:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:56598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729677AbgHQPYp (ORCPT ); Mon, 17 Aug 2020 11:24:45 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5311523444; Mon, 17 Aug 2020 15:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597677884; bh=k0AAVlIdFxxPOjKzHe5fG2GOOoYHzTyXq4uUWXtFjUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nQic9FLu+Px6ZvJPd++eXw64WnKZ79YVAu8pdWW+lwdma1br2687VfShHOn3XS+gC 4E8kGvJiA1HOG0IAKR8es8hGNU8zJfzhhNA9uw1j5ybpOqtDsGBWrrSVe62A6iEKBK bXZevZErxBbFNj4quckIMR2wwR/oT+gf+Dsedepo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , amd-gfx@lists.freedesktop.org, Emil Velikov , Sam Ravnborg , Thomas Zimmermann , Sasha Levin Subject: [PATCH 5.8 143/464] drm/amdgpu: use the unlocked drm_gem_object_put Date: Mon, 17 Aug 2020 17:11:36 +0200 Message-Id: <20200817143840.663904894@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Emil Velikov [ Upstream commit 1a87f67a66de4ad0c0d79fd86b6c5273143387c3 ] 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 Acked-by: Sam Ravnborg Reviewed-by: Christian König Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-8-emil.l.velikov@gmail.com Signed-off-by: Sasha Levin --- 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 43d8ed7dbd001..652c57a3b8478 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); } -- 2.25.1