[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210608175948.278276680@linuxfoundation.org>
Date: Tue, 8 Jun 2021 20:26:54 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Simon Ser <contact@...rsion.fr>,
Alex Deucher <alexander.deucher@....com>,
Harry Wentland <hwentlan@....com>,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
Bas Nieuwenhuizen <bas@...nieuwenhuizen.nl>,
Christian König <christian.koenig@....com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.12 084/161] amdgpu: fix GEM obj leak in amdgpu_display_user_framebuffer_create
From: Simon Ser <contact@...rsion.fr>
[ Upstream commit e0c16eb4b3610298a74ae5504c7f6939b12be991 ]
This error code-path is missing a drm_gem_object_put call. Other
error code-paths are fine.
Signed-off-by: Simon Ser <contact@...rsion.fr>
Fixes: 1769152ac64b ("drm/amdgpu: Fail fb creation from imported dma-bufs. (v2)")
Cc: Alex Deucher <alexander.deucher@....com>
Cc: Harry Wentland <hwentlan@....com>
Cc: Nicholas Kazlauskas <nicholas.kazlauskas@....com>
Cc: Bas Nieuwenhuizen <bas@...nieuwenhuizen.nl>
Reviewed-by: Christian König <christian.koenig@....com>
Signed-off-by: Alex Deucher <alexander.deucher@....com>
Cc: stable@...r.kernel.org
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index a2ac44cc2a6d..e80cc2928b58 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -944,6 +944,7 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,
domains = amdgpu_display_supported_domains(drm_to_adev(dev), bo->flags);
if (obj->import_attach && !(domains & AMDGPU_GEM_DOMAIN_GTT)) {
drm_dbg_kms(dev, "Cannot create framebuffer from imported dma_buf\n");
+ drm_gem_object_put(obj);
return ERR_PTR(-EINVAL);
}
--
2.30.2
Powered by blists - more mailing lists