Skip to content

Commit e0c16eb

Browse files
emersionalexdeucher
authored andcommitted
amdgpu: fix GEM obj leak in amdgpu_display_user_framebuffer_create
This error code-path is missing a drm_gem_object_put call. Other error code-paths are fine. Signed-off-by: Simon Ser <[email protected]> Fixes: 1769152 ("drm/amdgpu: Fail fb creation from imported dma-bufs. (v2)") Cc: Alex Deucher <[email protected]> Cc: Harry Wentland <[email protected]> Cc: Nicholas Kazlauskas <[email protected]> Cc: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 8c3dd61 commit e0c16eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,7 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,
986986
domains = amdgpu_display_supported_domains(drm_to_adev(dev), bo->flags);
987987
if (obj->import_attach && !(domains & AMDGPU_GEM_DOMAIN_GTT)) {
988988
drm_dbg_kms(dev, "Cannot create framebuffer from imported dma_buf\n");
989+
drm_gem_object_put(obj);
989990
return ERR_PTR(-EINVAL);
990991
}
991992

0 commit comments

Comments
 (0)