AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/amdgpu: Fix a deadlock if previous GEM object allocation fails
@ 2021-08-31  5:55 Pan, Xinhui
  2021-08-31  6:33 ` Christian König
  0 siblings, 1 reply; 2+ messages in thread
From: Pan, Xinhui @ 2021-08-31  5:55 UTC (permalink / raw)
  To: amd-gfx@lists.freedesktop.org
  Cc: Koenig, Christian, Deucher, Alexander, Grodzovsky, Andrey

Fall through to handle the error instead of return.

Signed-off-by: xinhui pan <xinhui.pan@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) {
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] drm/amdgpu: Fix a deadlock if previous GEM object allocation fails
  2021-08-31  5:55 [PATCH v2] drm/amdgpu: Fix a deadlock if previous GEM object allocation fails Pan, Xinhui
@ 2021-08-31  6:33 ` Christian König
  0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2021-08-31  6:33 UTC (permalink / raw)
  To: Pan, Xinhui, amd-gfx@lists.freedesktop.org
  Cc: Deucher, Alexander, Grodzovsky, Andrey

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@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) {


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-31  6:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-31  5:55 [PATCH v2] drm/amdgpu: Fix a deadlock if previous GEM object allocation fails Pan, Xinhui
2021-08-31  6:33 ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox