All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] drm/xe: Fix resource leaks in bo init and dma-buf paths
@ 2026-04-08 17:52 Shuicheng Lin
  2026-04-08 17:52 ` [PATCH v2 1/4] drm/xe/bo: Fix bo leak on unaligned size validation in xe_bo_init_locked() Shuicheng Lin
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Shuicheng Lin @ 2026-04-08 17:52 UTC (permalink / raw)
  To: intel-xe; +Cc: Shuicheng Lin

Fix several resource leaks in the xe driver's buffer object
initialization and dma-buf import paths:

Patches 1-2 fix xe_bo_init_locked() where two early validation error
paths return without freeing a caller-provided bo, violating the
documented contract that bo is freed on failure.

Patch 3 fixes xe_dma_buf_init_obj() where the pre-allocated storage bo
is leaked when drm_gpuvm_resv_object_alloc() fails.

Patch 4 fixes xe_gem_prime_import() where the dma-buf attachment is
leaked when xe_dma_buf_init_obj() fails.

v2: Add comments in patch 3.

Shuicheng Lin (4):
  drm/xe/bo: Fix bo leak on unaligned size validation in
    xe_bo_init_locked()
  drm/xe/bo: Fix bo leak on GGTT flag validation in xe_bo_init_locked()
  drm/xe: Fix bo leak in xe_dma_buf_init_obj() on allocation failure
  drm/xe: Fix dma-buf attachment leak in xe_gem_prime_import()

 drivers/gpu/drm/xe/xe_bo.c      |  8 ++++++--
 drivers/gpu/drm/xe/xe_dma_buf.c | 23 ++++++++++++++++++-----
 2 files changed, 24 insertions(+), 7 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-04-14 15:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08 17:52 [PATCH v2 0/4] drm/xe: Fix resource leaks in bo init and dma-buf paths Shuicheng Lin
2026-04-08 17:52 ` [PATCH v2 1/4] drm/xe/bo: Fix bo leak on unaligned size validation in xe_bo_init_locked() Shuicheng Lin
2026-04-08 17:52 ` [PATCH v2 2/4] drm/xe/bo: Fix bo leak on GGTT flag " Shuicheng Lin
2026-04-08 17:52 ` [PATCH v2 3/4] drm/xe: Fix bo leak in xe_dma_buf_init_obj() on allocation failure Shuicheng Lin
2026-04-08 17:52 ` [PATCH v2 4/4] drm/xe: Fix dma-buf attachment leak in xe_gem_prime_import() Shuicheng Lin
2026-04-08 18:03 ` ✗ CI.checkpatch: warning for drm/xe: Fix resource leaks in bo init and dma-buf paths (rev2) Patchwork
2026-04-08 18:04 ` ✗ CI.KUnit: failure " Patchwork
2026-04-10  2:29 ` ✗ CI.checkpatch: warning for drm/xe: Fix resource leaks in bo init and dma-buf paths (rev3) Patchwork
2026-04-10  2:30 ` ✓ CI.KUnit: success " Patchwork
2026-04-10  3:29 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-10  7:58 ` ✓ Xe.CI.FULL: " Patchwork
2026-04-14 15:44   ` Lin, Shuicheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.