Skip to content

drm/xe: Fix double-free of managed BOs in error paths

Shuicheng Lin intel-xe 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe/gsc: Fix double-free of managed BO in error pathdrivers/gpu/drm/xe/xe_gsc.c+1 -40 replies
2/2drm/xe/hw_engine: Fix double-free of managed BO in error pathdrivers/gpu/drm/xe/xe_hw_engine.c+1 -32 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchZongyao Bai
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] drm/xe: Fix double-free of managed BOs in error paths

Two callers of xe_managed_bo_create_pin_map() explicitly free the BO via xe_bo_unpin_map_no_vm() in their error paths. Since the managed BO already has a devm cleanup action registered, this causes a double-free when devm unwinds during probe failure.

Remove the explicit frees and let devm handle cleanup, consistent with all other xe_managed_bo_create_pin_map() callers.

Shuicheng Lin (2):
drm/xe/gsc: Fix double-free of managed BO in error path drm/xe/hw_engine: Fix double-free of managed BO in error path

 drivers/gpu/drm/xe/xe_gsc.c       | 5 +----
 drivers/gpu/drm/xe/xe_hw_engine.c | 4 +---
 2 files changed, 2 insertions(+), 7 deletions(-)
Signature · 1 line
2.43.0