Skip to contentSkip to conversation

drm/amdgpu: fix null pointer for bo unmap trace function

PATCH In review Junwei Zhang 2 participants 2 messages May 11, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix null pointer for bo unmap trace function

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +1 -1
index 532263a..e96e26d 100644
@@ -275,7 +275,7 @@
 			     ),
 
 	    TP_fast_assign(
-			   __entry->bo = bo_va->base.bo;
+			   __entry->bo = bo_va ? bo_va->base.bo : NULL;
 			   __entry->start = mapping->start;
 			   __entry->last = mapping->last;
 			   __entry->offset = mapping->offset;
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1526031003-11476-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 11.05.2018 um 11:30 schrieb Junwei Zhang:

Quoted 1 line
Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +0 -0
index 532263a..e96e26d 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h line 281

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +1 -1
@@ -275,7 +275,7 @@
  			     ),
 
  	    TP_fast_assign(
-			   __entry->bo = bo_va->base.bo;
+			   __entry->bo = bo_va ? bo_va->base.bo : NULL;
  			   __entry->start = mapping->start;
  			   __entry->last = mapping->last;
  			   __entry->offset = mapping->offset;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx