[PATCH v2] drm/amdgpu: Fix a deadlock if previous GEM object allocation fails

Christian König christian.koenig at amd.com
Tue Aug 31 06:33:17 UTC 2021


Am 31.08.21 um 07:55 schrieb Pan, Xinhui:
> 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.

>
> Signed-off-by: xinhui pan <xinhui.pan at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 85b292ed5c43..7ddd429052ea 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -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) {



More information about the amd-gfx mailing list