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 userq resource double freed

As the userq resource was already freed at the drm_release
early phase, it should avoid freeing userq resource again
at the later kms postclose callback.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Jesse Zhang <Jesse.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Prike Liang and committed by
Alex Deucher
64db7670 96a86dcb

+5 -4
+5 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
··· 1502 1502 amdgpu_bo_unreserve(pd); 1503 1503 } 1504 1504 1505 - fpriv->evf_mgr.fd_closing = true; 1506 - amdgpu_userq_mgr_fini(&fpriv->userq_mgr); 1507 - amdgpu_eviction_fence_destroy(&fpriv->evf_mgr); 1508 - 1505 + if (!fpriv->evf_mgr.fd_closing) { 1506 + fpriv->evf_mgr.fd_closing = true; 1507 + amdgpu_userq_mgr_fini(&fpriv->userq_mgr); 1508 + amdgpu_eviction_fence_destroy(&fpriv->evf_mgr); 1509 + } 1509 1510 amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr); 1510 1511 amdgpu_vm_fini(adev, &fpriv->vm); 1511 1512