From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 4F54DC10F27 for ; Tue, 10 Mar 2020 10:15:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0CFDC20637 for ; Tue, 10 Mar 2020 10:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583835349; bh=NVbsNNzaTfUDf4b3XmHM31MJ1rLkdCjHVr0Byzb2c2I=; h=Subject:To:Cc:From:Date:List-ID:From; b=RrQByxDJvatEzMSPh7jSgPtMEKUAkk/VA01dBZhybWv//LptSM7hEOkwopA4KUs/Q 6aG3hgF1zP6g94+SSa/xunBUXBq2n/y4YEjDTsjYWhTFmqMLVqSmTuBCiPFEKJufLN rs4CvpPpH5o1SWOcOse7gdgiENpC4yAFT9yaht5E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726100AbgCJKPs (ORCPT ); Tue, 10 Mar 2020 06:15:48 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:56217 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725845AbgCJKPs (ORCPT ); Tue, 10 Mar 2020 06:15:48 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1C60F220BE; Tue, 10 Mar 2020 06:15:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 10 Mar 2020 06:15:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=VoS854 oGkbR+yD4wfO21W5WZfVUemaRcq5NLMR+23ws=; b=BO+2WLkX9lY885X7TBP47S pkNGBO6aNl3EYIl0tHuZ5fFSNLadtgdWuDZVDvmsvIgGlD37lzarN2xHWvnctQxA JTF2hXJYr2MzLLHXoHX0EVtK1oGunBCqUz8NzRR75eTMejBaHpO/WZvMoyC3neR7 viaW68tl3gYxyJbqtThJezh0wYZkXkUmYIdQq02pY4busRZcVD6CG2lwazG7o0Zt Ytvs0W46qOTbVsbmZJlrLfxZln7A3LPtFMu9QRPrSMKTVe37hYFBL1V1VcBd4/FC aa4CJzT9pYnTnNBnLuMCYBK/KjuQQo3x5JXaGpi33m5T8bgRk3zJgv1MlBtQp2DQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddvtddguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtjeenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuffhomhgrihhnpehfrhgvvgguvghskhhtohhprdhorhhgpdgsrghsvgdruggvvh enucfkphepkeefrdekiedrkeelrddutdejnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id C7E7130611FB; Tue, 10 Mar 2020 06:15:45 -0400 (EDT) Subject: FAILED: patch "[PATCH] drm/ttm: fix leaking fences via ttm_buffer_object_transfer" failed to apply to 5.4-stable tree To: Ahzo@tutanota.com, alexander.deucher@amd.com, christian.koenig@amd.com Cc: From: Date: Tue, 10 Mar 2020 11:15:43 +0100 Message-ID: <15838353439240@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 8c8c06207bcfc5a7e5918fc0a0f7f7b9a2e196d6 Mon Sep 17 00:00:00 2001 From: Ahzo Date: Tue, 25 Feb 2020 13:56:14 -0500 Subject: [PATCH] drm/ttm: fix leaking fences via ttm_buffer_object_transfer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set the drm_device to NULL, so that the newly created buffer object doesn't appear to use the embedded gem object. This is necessary, because otherwise no corresponding dma_resv_fini for the dma_resv_init is called, resulting in a memory leak. The dma_resv_fini in ttm_bo_release_list is only called if the embedded gem object is not used, which is determined by checking if the drm_device is NULL. Bug: https://gitlab.freedesktop.org/drm/amd/issues/958 Fixes: 1e053b10ba60 ("drm/ttm: use gem reservation object") Reviewed-by: Christian König Signed-off-by: Ahzo Signed-off-by: Alex Deucher Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/355089/ diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 49ed55779128..953c82a4f573 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -515,6 +515,7 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, fbo->base.base.resv = &fbo->base.base._resv; dma_resv_init(&fbo->base.base._resv); + fbo->base.base.dev = NULL; ret = dma_resv_trylock(&fbo->base.base._resv); WARN_ON(!ret);