mirror of
https://github.com/torvalds/linux.git
synced 2026-05-18 11:38:01 +02:00
There is a chance that obj->dma_buf would be NULL by the time
virtgpu_dma_buf_free_obj() is called. This can happen for imported
prime objects, when drm_gem_object_exported_dma_buf_free() gets
called on them before drm_gem_object_free(). This is because
drm_gem_object_exported_dma_buf_free() explicitly sets
obj->dma_buf to NULL.
Therefore, fix this issue by storing the dma_buf pointer in the
virtio_gpu_object instance and using it in virtgpu_dma_buf_free_obj.
This stored pointer is guaranteed to be valid until the object is
freed as we took a reference on it in virtgpu_gem_prime_import().
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| virtgpu_debugfs.c | ||
| virtgpu_display.c | ||
| virtgpu_drv.c | ||
| virtgpu_drv.h | ||
| virtgpu_fence.c | ||
| virtgpu_gem.c | ||
| virtgpu_ioctl.c | ||
| virtgpu_kms.c | ||
| virtgpu_object.c | ||
| virtgpu_plane.c | ||
| virtgpu_prime.c | ||
| virtgpu_submit.c | ||
| virtgpu_trace_points.c | ||
| virtgpu_trace.h | ||
| virtgpu_vq.c | ||
| virtgpu_vram.c | ||