summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_client.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2023-01-26 10:24:26 +0100
committerChristian König <christian.koenig@amd.com>2023-02-07 09:42:56 +0100
commit85e26dd5100a182bf8448050427539c0a66ab793 (patch)
tree6e83e2af7b4400316d53667e269db34f4a213f63 /include/drm/drm_client.h
parent8f20660f053cefd4693e69cfff9cf58f4f7c4929 (diff)
downloadlinux-85e26dd5100a182bf8448050427539c0a66ab793.tar.gz
linux-85e26dd5100a182bf8448050427539c0a66ab793.tar.bz2
linux-85e26dd5100a182bf8448050427539c0a66ab793.zip
drm/client: fix circular reference counting issue
We reference dump buffers both by their handle as well as their object. The problem is now that when anybody iterates over the DRM framebuffers and exports the underlying GEM objects through DMA-buf we run into a circular reference count situation. The result is that the fbdev handling holds the GEM handle preventing the DMA-buf in the GEM object to be released. This DMA-buf in turn holds a reference to the driver module which on unload would release the fbdev. Break that loop by releasing the handle as soon as the DRM framebuffer object is created. The DRM framebuffer and the DRM client buffer structure still hold a reference to the underlying GEM object preventing its destruction. Signed-off-by: Christian König <christian.koenig@amd.com> Fixes: c76f0f7cb546 ("drm: Begin an API for in-kernel clients") Cc: <stable@vger.kernel.org> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230126102814.8722-1-christian.koenig@amd.com
Diffstat (limited to 'include/drm/drm_client.h')
-rw-r--r--include/drm/drm_client.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h
index 4fc8018eddda..1220d185c776 100644
--- a/include/drm/drm_client.h
+++ b/include/drm/drm_client.h
@@ -127,11 +127,6 @@ struct drm_client_buffer {
struct drm_client_dev *client;
/**
- * @handle: Buffer handle
- */
- u32 handle;
-
- /**
* @pitch: Buffer pitch
*/
u32 pitch;