Skip to content

Commit 4f854a8

Browse files
mbrost05rodrigovivi
authored andcommitted
drm/xe: Use dma_fence_chain_free in chain fence unused as a sync
A chain fence is uninitialized if not installed in a drm sync obj. Thus if xe_sync_entry_cleanup is called and sync->chain_fence is non-NULL the proper cleanup is dma_fence_chain_free rather than a dma-fence put. Reported-by: Paulo Zanoni <[email protected]> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2411 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2261 Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 7f7a2da) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent ae02c7b commit 4f854a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/xe/xe_sync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ void xe_sync_entry_cleanup(struct xe_sync_entry *sync)
263263
if (sync->fence)
264264
dma_fence_put(sync->fence);
265265
if (sync->chain_fence)
266-
dma_fence_put(&sync->chain_fence->base);
266+
dma_fence_chain_free(sync->chain_fence);
267267
if (sync->ufence)
268268
user_fence_put(sync->ufence);
269269
}

0 commit comments

Comments
 (0)