This reverts commit 482c7e296edc0f594e8869a789a40be53c49bd6a.
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 5307dce878d4 ("drm/gem: Acquire references on
GEM handles for framebuffers") and commit f6bfc9afc751 ("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>
Link: https://lore.kernel.org/r/20250715084549.41473-1-tzimmermann@suse.de
|
||
|---|---|---|
| .. | ||
| dc.c | ||
| dc.h | ||
| dp.c | ||
| dp.h | ||
| dpaux.c | ||
| dpaux.h | ||
| drm.c | ||
| drm.h | ||
| dsi.c | ||
| dsi.h | ||
| falcon.c | ||
| falcon.h | ||
| fb.c | ||
| fbdev.c | ||
| firewall.c | ||
| gem.c | ||
| gem.h | ||
| gr2d.c | ||
| gr2d.h | ||
| gr3d.c | ||
| gr3d.h | ||
| hda.c | ||
| hda.h | ||
| hdmi.c | ||
| hdmi.h | ||
| hub.c | ||
| hub.h | ||
| Kconfig | ||
| Makefile | ||
| mipi-phy.c | ||
| mipi-phy.h | ||
| nvdec.c | ||
| output.c | ||
| plane.c | ||
| plane.h | ||
| rgb.c | ||
| riscv.c | ||
| riscv.h | ||
| sor.c | ||
| sor.h | ||
| submit.c | ||
| submit.h | ||
| trace.c | ||
| trace.h | ||
| uapi.c | ||
| uapi.h | ||
| vic.c | ||
| vic.h | ||