<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>verified work,</p>
<p><br>
</p>
<p>Reviewed-by: Monk Liu <monk.liu@amd.com><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Christian König <deathsimple@vodafone.de><br>
<b>Sent:</b> Wednesday, September 13, 2017 4:47:34 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org<br>
<b>Subject:</b> [PATCH] drm/ttm: fix memory leak while individualizing BOs</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">From: Christian König <christian.koenig@amd.com><br>
<br>
We need to free the reservation object before we take the BO<br>
from the delayed delete list.<br>
<br>
Signed-off-by: Christian König <christian.koenig@amd.com><br>
---<br>
drivers/gpu/drm/ttm/ttm_bo.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c<br>
index bee77d3..d79607a 100644<br>
--- a/drivers/gpu/drm/ttm/ttm_bo.c<br>
+++ b/drivers/gpu/drm/ttm/ttm_bo.c<br>
@@ -557,6 +557,8 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo,<br>
}<br>
<br>
ttm_bo_del_from_lru(bo);<br>
+ if (!list_empty(&bo->ddestroy) && (bo->resv != &bo->ttm_resv))<br>
+ reservation_object_fini(&bo->ttm_resv);<br>
list_del_init(&bo->ddestroy);<br>
kref_put(&bo->list_kref, ttm_bo_ref_bug);<br>
<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font>
</body>
</html>