<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Christian König <ckoenig.leichtzumerken@gmail.com><br>
<b>Sent:</b> Friday, December 10, 2021 3:39 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; alexdeucher@gmail.com <alexdeucher@gmail.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: fix dropped backing store handling in amdgpu_dma_buf_move_notify</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">bo->tbo.resource can now be NULL.<br>
<br>
Signed-off-by: Christian König <christian.koenig@amd.com><br>
Bug: <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1811&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C8ece16670f1b44091a4308d9bbb897e5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637747223768954678%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=N4gltO0T3wozmHbROWRr3RiWFWXNu522ghTewe8T3bA%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1811&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C8ece16670f1b44091a4308d9bbb897e5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637747223768954678%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=N4gltO0T3wozmHbROWRr3RiWFWXNu522ghTewe8T3bA%3D&amp;reserved=0</a><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c<br>
index ae6ab93c868b..7444484a12bf 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c<br>
@@ -384,7 +384,7 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach)<br>
         struct amdgpu_vm_bo_base *bo_base;<br>
         int r;<br>
 <br>
-       if (bo->tbo.resource->mem_type == TTM_PL_SYSTEM)<br>
+       if (!bo->tbo.resource || bo->tbo.resource->mem_type == TTM_PL_SYSTEM)<br>
                 return;<br>
 <br>
         r = ttm_bo_validate(&bo->tbo, &placement, &ctx);<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>