Message ID | BLUPR12MB04492B7ABAB2EE820D31CAE8846E0@BLUPR12MB0449.namprd12.prod.outlook.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AA99F603F4 for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 13 Sep 2017 09:45:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9985028F6C for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 13 Sep 2017 09:45:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E5C129043; Wed, 13 Sep 2017 09:45:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, HTML_MESSAGE, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 90C5328F6C for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 13 Sep 2017 09:45:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75DE96E0B7; Wed, 13 Sep 2017 09:45:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 899 seconds by postgrey-1.35 at gabe; Wed, 13 Sep 2017 09:45:27 UTC Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0040.outbound.protection.outlook.com [104.47.33.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id 024F86E09C; Wed, 13 Sep 2017 09:45:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2axXbnVj0Mxo/dYdy90N2rwEdYM75yjj2JS7sFe02aU=; b=5LDcA1NS12PA7fCAiVD6ipywZUDZI7keHYVaIH/rcbBtKyy+ht5GyQuMyDE51VJ05Y6z4JAboyQU7AezTAbGpsWuRlpjTwZ2Q+Ipaj8KBwuu5SWGZWNntH1ywa0yF+EaCJFpBZx5pGbA0tk2IM/CdD88sSaZx8kmxe1DfojUF/M= Received: from BLUPR12MB0449.namprd12.prod.outlook.com (10.162.92.142) by BLUPR12MB0468.namprd12.prod.outlook.com (10.162.92.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Wed, 13 Sep 2017 09:30:25 +0000 Received: from BLUPR12MB0449.namprd12.prod.outlook.com ([10.162.92.142]) by BLUPR12MB0449.namprd12.prod.outlook.com ([10.162.92.142]) with mapi id 15.20.0035.021; Wed, 13 Sep 2017 09:30:25 +0000 From: "Liu, Monk" <Monk.Liu@amd.com> To: =?iso-8859-1?Q?Christian_K=F6nig?= <deathsimple@vodafone.de>, "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>, "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org> Subject: Re: [PATCH] drm/ttm: fix memory leak while individualizing BOs Thread-Topic: [PATCH] drm/ttm: fix memory leak while individualizing BOs Thread-Index: AQHTLGz73M5nJZEk9ke8GtrF7Tz9/KKyjOZQ Date: Wed, 13 Sep 2017 09:30:25 +0000 Message-ID: <BLUPR12MB04492B7ABAB2EE820D31CAE8846E0@BLUPR12MB0449.namprd12.prod.outlook.com> References: <1505292454-22259-1-git-send-email-deathsimple@vodafone.de> In-Reply-To: <1505292454-22259-1-git-send-email-deathsimple@vodafone.de> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Monk.Liu@amd.com; x-originating-ip: [116.228.147.241] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BLUPR12MB0468; 20:1UCXxPJGkSIdkvKnw7mtwPRvT4fKGt/+10dXHS0OcfmlyG1X4c13IBpgV44ov+hRxww/XJZsdvKaF6O+B3iwH5IdaSTsuam780PdHCXulRNmbrb239H9mkOKPXoDr6OpSf0Xry9VH5Ro/lnJ8aZKvocf0MYe35UIowuyNEcNcp2gInkiuyawKWqeBUIJgyPA6prh0nRA6rXME/MInfg+J1+pKefM+UKawJ5R0QINBmayzgF3Q24VhDHn7cbrms/a x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 1d057f6a-f592-4e31-119c-08d4fa8a10ad x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BLUPR12MB0468; x-ms-traffictypediagnostic: BLUPR12MB0468: x-exchange-antispam-report-test: UriScan:(158342451672863)(767451399110)(217544274631240); x-microsoft-antispam-prvs: <BLUPR12MB0468181B7275E0AB2F7FF681846E0@BLUPR12MB0468.namprd12.prod.outlook.com> x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR12MB0468; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR12MB0468; x-forefront-prvs: 042957ACD7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(366002)(346002)(189002)(199003)(377454003)(229853002)(3660700001)(478600001)(50986999)(54356999)(7696004)(3280700002)(33656002)(97736004)(101416001)(76176999)(25786009)(6246003)(106356001)(105586002)(55016002)(99286003)(2950100002)(66066001)(189998001)(6506006)(2900100001)(2906002)(236005)(6436002)(81166006)(54896002)(9686003)(77096006)(6306002)(8936002)(316002)(606006)(7736002)(86362001)(5660300001)(966005)(2201001)(72206003)(8676002)(53936002)(68736007)(14454004)(102836003)(6116002)(3846002)(74316002)(2501003)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0468; H:BLUPR12MB0449.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Sep 2017 09:30:25.6572 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0468 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Content-Type: multipart/mixed; boundary="===============2043190168==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index bee77d3..d79607a 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -557,6 +557,8 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo, } ttm_bo_del_from_lru(bo); + if (!list_empty(&bo->ddestroy) && (bo->resv != &bo->ttm_resv)) + reservation_object_fini(&bo->ttm_resv); list_del_init(&bo->ddestroy); kref_put(&bo->list_kref, ttm_bo_ref_bug);
verified work, Reviewed-by: Monk Liu <monk.liu@amd.com>