Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: fix kcq mqd_backup buffer double free for multi-XCD

For gfx_v9_4_3 and beyond, struct kiq has its own mqd_backup pointer
rather than using the last pointer from mec struct. Then the kfree
operation on the pointer from the mec struct should be removed otherwise
it will cause double free on the first kcq's mqd_backup buffer on XCD1.

Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Shiwu Zhang and committed by
Alex Deucher
37dd9d58 cbd442ce

-1
-1
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
··· 480 480 481 481 ring = &kiq->ring; 482 482 kfree(kiq->mqd_backup); 483 - kfree(adev->gfx.mec.mqd_backup[AMDGPU_MAX_COMPUTE_RINGS]); 484 483 amdgpu_bo_free_kernel(&ring->mqd_obj, 485 484 &ring->mqd_gpu_addr, 486 485 &ring->mqd_ptr);