From patchwork Mon Aug 24 08:29:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 265200 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42E9EC433E5 for ; Mon, 24 Aug 2020 08:35:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 171B122B4D for ; Mon, 24 Aug 2020 08:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598258101; bh=g+3Uo/aO5dluReE790lVRLnSb6yjhQw/wFQxZjqFlLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=f4Dso7xNLdKmfohOEOx7+cq5Sz2in77v6PuBABb8pFo1zOOUW5scKu1kerObe/dVR JDmS4pO+doopmAJBZ/OcR8bu51lppyYYlv4M4ISwJKk4M/h/iSgxXX4Kufg+5hdpCw 0BJX1nmHIjMM/PHNsOExp7QE5Z52obkAMRKkMLmU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728043AbgHXIe6 (ORCPT ); Mon, 24 Aug 2020 04:34:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:44534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728035AbgHXIe4 (ORCPT ); Mon, 24 Aug 2020 04:34:56 -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 D2919206F0; Mon, 24 Aug 2020 08:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598258096; bh=g+3Uo/aO5dluReE790lVRLnSb6yjhQw/wFQxZjqFlLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FYgVfrrdOCcUT2cmUOQBn4uhNJxMT+Gts105/bRqLRTCoKfIdpR5QhGR6no5BYggy KY34CT7+5es7paz3fy2YQY3vscGMCG6qw8xU35/ccyYKw2hRPOriupew97NnDsOKi8 Xbyv4YDhewlmtKj8D84S69wtnAK45lNwsLmvteiw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xin He , Qi Liu , Muchun Song , Gerd Hoffmann , Sasha Levin Subject: [PATCH 5.8 073/148] drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl() Date: Mon, 24 Aug 2020 10:29:31 +0200 Message-Id: <20200824082417.566014766@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200824082413.900489417@linuxfoundation.org> References: <20200824082413.900489417@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Qi Liu [ Upstream commit 8b6ec999b198b59ae61e86e70f5e9df73fe4754f ] We should put the reference count of the fence after calling virtio_gpu_cmd_submit(). So add the missing dma_fence_put(). Fixes: 2cd7b6f08bc4 ("drm/virtio: add in/out fence support for explicit synchronization") Co-developed-by: Xin He Signed-off-by: Xin He Signed-off-by: Qi Liu Reviewed-by: Muchun Song Link: http://patchwork.freedesktop.org/patch/msgid/20200721101647.42653-1-hexin.op@bytedance.com Signed-off-by: Gerd Hoffmann Signed-off-by: Sasha Levin --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 5df722072ba0b..19c5bc01eb790 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -179,6 +179,7 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, vfpriv->ctx_id, buflist, out_fence); + dma_fence_put(&out_fence->f); virtio_gpu_notify(vgdev); return 0;