<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<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,Arial,Helvetica,sans-serif">
<p>thanks for this catch!</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>发件人:</b> Colin King <colin.king@canonical.com><br>
<b>发送时间:</b> 2017年2月4日 4:23:42<br>
<b>收件人:</b> Deucher, Alexander; Koenig, Christian; David Airlie; Liu, Monk; Yu, Xiangliang; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org<br>
<b>抄送:</b> kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org<br>
<b>主题:</b> [PATCH] drm/amdgpu/virt: fix double kfree on bo_va</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">From: Colin Ian King <colin.king@canonical.com><br>
<br>
bo_va is being kfree'd twice, once in the call to amdgpu_vm_bo_rmv<br>
and then a short while later. Fix this double free by removing<br>
the 2nd kfree.<br>
<br>
Detected by CoverityScan, CID#1399524 ("Double Free")<br>
<br>
Signed-off-by: Colin Ian King <colin.king@canonical.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 -<br>
1 file changed, 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c<br>
index 3fd951c..dcfb7df 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c<br>
@@ -83,7 +83,6 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm)<br>
DRM_ERROR("failed to do bo_map on static CSA, err=%d\n", r);<br>
amdgpu_vm_bo_rmv(adev, bo_va);<br>
ttm_eu_backoff_reservation(&ticket, &list);<br>
- kfree(bo_va);<br>
return r;<br>
}<br>
<br>
-- <br>
2.10.2<br>
<br>
</div>
</span></font>
</body>
</html>