linux/drivers/gpu/drm/virtio
Thomas Zimmermann 0ecfb8ddb9 Revert "drm/virtio: Use dma_buf from GEM object instance"
This reverts commit 415cb45895.

The dma_buf field in struct drm_gem_object is not stable over the
object instance's lifetime. The field becomes NULL when user space
releases the final GEM handle on the buffer object. This resulted
in a NULL-pointer deref.

Workarounds in commit 5307dce878 ("drm/gem: Acquire references on
GEM handles for framebuffers") and commit f6bfc9afc7 ("drm/framebuffer:
Acquire internal references on GEM handles") only solved the problem
partially. They especially don't work for buffer objects without a DRM
framebuffer associated.

Hence, this revert to going back to using .import_attach->dmabuf.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/r/20250715155934.150656-3-tzimmermann@suse.de
2025-07-17 12:26:19 +02:00
..
Kconfig drm/virtgpu: Run DRM default client setup 2024-09-26 09:31:28 +02:00
Makefile
virtgpu_debugfs.c
virtgpu_display.c drm/connector: make mode_valid take a const struct drm_display_mode 2025-01-07 12:45:19 +02:00
virtgpu_drv.c virtgpu: don't reset on shutdown 2025-04-18 10:05:49 -04:00
virtgpu_drv.h drm/virtio: Add drm_panic support 2025-02-09 20:36:51 +03:00
virtgpu_fence.c dma-buf/dma-fence: remove unnecessary callbacks 2025-03-06 15:20:53 +01:00
virtgpu_gem.c Merge drm/drm-fixes into drm-misc-fixes 2025-04-08 10:15:47 +02:00
virtgpu_ioctl.c drm/virtio: Use generic dumb_map_offset implementation 2024-11-18 14:08:37 +03:00
virtgpu_kms.c virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00
virtgpu_object.c drm/virtio: Add helpers to initialize and free the imported object 2024-11-26 12:52:52 +03:00
virtgpu_plane.c drm/virtio: Support drm_panic with non-vmapped shmem BO 2025-04-16 10:19:42 +03:00
virtgpu_prime.c Revert "drm/virtio: Use dma_buf from GEM object instance" 2025-07-17 12:26:19 +02:00
virtgpu_submit.c drm/virtio: Fix type of dma-fence context variable 2024-07-24 20:42:19 +03:00
virtgpu_trace_points.c
virtgpu_trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
virtgpu_vq.c drm/virtio: Add drm_panic support 2025-02-09 20:36:51 +03:00
virtgpu_vram.c drm/virtio: Support partial maps of GEM objects 2025-01-25 00:16:57 +03:00