drm/amdgpu: Fix a deadlock if previous GEM object allocation fails
Subsystems (2)
PATCH v2 1/1 drm/amdgpu: Fix a deadlock if previous GEM object allocation fails
Fall through to handle the error instead of return.
Signed-off-by xinhui pan <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0 -1
@@ -355,7 +355,6 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,DRM_DEBUG ("Failed to allocate GEM object (%llu, %d, %llu, %d)\n" , size, initial_domain, args->in.alignment, r); } -return r; }if (flags &AMDGPU_GEM_CREATE_VM_ALWAYS_VALID ) {
Signature · 1 line
2.25.1
Christian König
maintainerAm 31.08.21 um 07:55 schrieb Pan, Xinhui:
Quoted 1 line
Fall through to handle the error instead of return.
Can you also clean up the "if (r) {.. if (r !=..." above?
And please figure out which patch introduced the problem and add a Fixes: tag and maybe CC: stable as well.
Thanks for the help,
Christian.
Quoted 18 lines
Signed-off-by xinhui pan <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0
-1@@ -355,7 +355,6 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,DRM_DEBUG ("Failed to allocate GEM object (%llu, %d, %llu, %d)\n" , size, initial_domain, args->in.alignment, r); } -return r; }if (flags &AMDGPU_GEM_CREATE_VM_ALWAYS_VALID ) {