Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2827847pxb; Mon, 1 Nov 2021 02:40:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiIP3yZR5IrV8iZT1e0YSApYv6uDvy3ifgD4xekrJ/kBnvRLtBkRa38U3j86lBQltMqMjk X-Received: by 2002:a17:906:5d0b:: with SMTP id g11mr5890586ejt.381.1635759601796; Mon, 01 Nov 2021 02:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635759601; cv=none; d=google.com; s=arc-20160816; b=paVnInFXErA3Gxf9Hh4LV726EnIavzth7+OveniqCNRbUB6dZLeNZnrxl5I/b1l1n9 MIc04tvkvW3hc68KIS+y2QkDGsPOFn6U6Y0y5g7MImfPv37ouBIGzDByMtppheOnTPMm PBVavc+HPnjvK1gIp+IlHtSwnMQ7zC0zbSAbUzeewjO6qgb8bq+5EaWu/nJbzOf1Yddo RylbzANkGgZKgzjeb2eVNLmU/XNOIrPu3nXuGlp3z6nPBUvJOAKvzbQjc3GoMuJbJ/4T ZMCrGm3f3XJy6U0DX/4zEv8hPhI+x8f/BjEXSYkrMDyhyDLoIVT/TEa7T8Zn4r+2PM5L ViEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UbqHb7keX5tX/aserGpPu0TLmjnJV7TDvfjCSaA/hpU=; b=09+mFjxYTiLPtXHuI3r4iM+1ZCP6l46gshYuavwXB2ATF++zUYxl2glG7sqV7Tcpg7 HXoiC17gzo4RogdVnLqar1+r8xg/lCUKgaQvBMX/HWaDRgSCOdfaDAo4yMSd99jvr5P+ kWYCP2dRm/jQa1J7GQUe3Xyr/PADPfBrWQ1er8vEQRJ4/uuqKVZwJDy4DwS3MRaWc/E/ bQmOenx5EBqbQYhLU/1R/3dD0h8yj2tgxURSRU/0+zJIfl8mkUDTdHhxwm7GNIGw+a5p tKryI2dFPczv2FGxZpJf0iOO3KGmboGZZE39cjO1da1qDq0I9KWxS7KbAq/bRKOultBG tung== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MrWCr+II; 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=pass (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 t17si18527013edi.478.2021.11.01.02.39.38; Mon, 01 Nov 2021 02:40:01 -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=@linuxfoundation.org header.s=korg header.b=MrWCr+II; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233746AbhKAJk1 (ORCPT + 99 others); Mon, 1 Nov 2021 05:40:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:43678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233236AbhKAJh7 (ORCPT ); Mon, 1 Nov 2021 05:37:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 577A061362; Mon, 1 Nov 2021 09:27:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635758823; bh=Oc7DV+8+K8FyEgu1j+qnv+3akbMOQp0p8JM75XW6WhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MrWCr+IIC4GQF0jtzSvmSX6JG36ldNXBUvZgUVRYvqU40goTNoF/SmzaiVFt8B3rZ wZeTD5SZiPFBmCKwda1IBy21ouBdyadqoV5Zm36wB5UriVHKvKqivIlWC+AEG2/ivq CGXlNpOUQlKO+Tb+jJRoui/I9c9ii6SCPdKHINbY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , "Erhard F." , Huang Rui Subject: [PATCH 5.10 32/77] drm/ttm: fix memleak in ttm_transfered_destroy Date: Mon, 1 Nov 2021 10:17:20 +0100 Message-Id: <20211101082518.624936309@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211101082511.254155853@linuxfoundation.org> References: <20211101082511.254155853@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian König commit 0db55f9a1bafbe3dac750ea669de9134922389b5 upstream. We need to cleanup the fences for ghost objects as well. Signed-off-by: Christian König Reported-by: Erhard F. Tested-by: Erhard F. Reviewed-by: Huang Rui Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214029 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214447 CC: Link: https://patchwork.freedesktop.org/patch/msgid/20211020173211.2247-1-christian.koenig@amd.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/ttm/ttm_bo_util.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -322,6 +322,7 @@ static void ttm_transfered_destroy(struc struct ttm_transfer_obj *fbo; fbo = container_of(bo, struct ttm_transfer_obj, base); + dma_resv_fini(&fbo->base.base._resv); ttm_bo_put(fbo->bo); kfree(fbo); }