Commit 2712ca8
committed
Revert "drm/gem-framebuffer: Use dma_buf from GEM object instance"
This reverts commit cce16fc.
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 5307dce ("drm/gem: Acquire references on
GEM handles for framebuffers") and commit f6bfc9a ("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.
v3:
- cc stable
Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Simona Vetter <[email protected]>
Acked-by: Christian König <[email protected]>
Acked-by: Zack Rusin <[email protected]>
Cc: <[email protected]> # v6.15+
Link: https://lore.kernel.org/r/[email protected]1 parent fb4ef4a commit 2712ca8
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
422 | 423 | | |
423 | 424 | | |
424 | 425 | | |
| |||
427 | 428 | | |
428 | 429 | | |
429 | 430 | | |
| 431 | + | |
430 | 432 | | |
431 | 433 | | |
432 | | - | |
| 434 | + | |
433 | 435 | | |
434 | 436 | | |
435 | 437 | | |
| |||
452 | 454 | | |
453 | 455 | | |
454 | 456 | | |
| 457 | + | |
455 | 458 | | |
456 | 459 | | |
457 | 460 | | |
| |||
462 | 465 | | |
463 | 466 | | |
464 | 467 | | |
| 468 | + | |
465 | 469 | | |
466 | 470 | | |
467 | | - | |
| 471 | + | |
468 | 472 | | |
469 | 473 | | |
470 | 474 | | |
| |||
0 commit comments