Skip to content

Commit ea67deb

Browse files
amd-sukhatrialexdeucher
authored andcommitted
drm/amdgpu: fix out of bounds access in gfx11 during ip dump
During ip dump in gfx11 the index variable is reused but is not reinitialized to 0 and this causes the index calculation to be wrong and access out of bound access. Acked-by: Christian König <[email protected]> Signed-off-by: Sunil Khatri <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 94845ea commit ea67deb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6411,6 +6411,7 @@ static void gfx_v11_ip_print(void *handle, struct drm_printer *p)
64116411
if (!adev->gfx.ip_dump_gfx_queues)
64126412
return;
64136413

6414+
index = 0;
64146415
reg_count = ARRAY_SIZE(gc_gfx_queue_reg_list_11);
64156416
drm_printf(p, "\nnum_me: %d num_pipe: %d num_queue: %d\n",
64166417
adev->gfx.me.num_me,
@@ -6475,6 +6476,7 @@ static void gfx_v11_ip_dump(void *handle)
64756476
if (!adev->gfx.ip_dump_gfx_queues)
64766477
return;
64776478

6479+
index = 0;
64786480
reg_count = ARRAY_SIZE(gc_gfx_queue_reg_list_11);
64796481
amdgpu_gfx_off_ctrl(adev, false);
64806482
mutex_lock(&adev->srbm_mutex);

0 commit comments

Comments
 (0)