Skip to content

Commit 4b2efb9

Browse files
committed
accel/ivpu: Fix general protection fault in ivpu_bo_list()
Check if ctx is not NULL before accessing its fields. Fixes: 37dee2a ("accel/ivpu: Improve buffer object debug logs") Cc: [email protected] # v6.8 Reviewed-by: Karol Wachowski <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Jacek Lawrynowicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2182e0f commit 4b2efb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/accel/ivpu/ivpu_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ static void ivpu_bo_print_info(struct ivpu_bo *bo, struct drm_printer *p)
409409
mutex_lock(&bo->lock);
410410

411411
drm_printf(p, "%-9p %-3u 0x%-12llx %-10lu 0x%-8x %-4u",
412-
bo, bo->ctx->id, bo->vpu_addr, bo->base.base.size,
412+
bo, bo->ctx ? bo->ctx->id : 0, bo->vpu_addr, bo->base.base.size,
413413
bo->flags, kref_read(&bo->base.base.refcount));
414414

415415
if (bo->base.pages)

0 commit comments

Comments
 (0)