[PATCH] drm/xe: Use dma_fence_chain_free in chain fence unused as a sync
Matthew Auld
matthew.auld at intel.com
Mon Jul 29 08:46:54 UTC 2024
On 27/07/2024 02:22, Matthew Brost wrote:
> 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 <paulo.r.zanoni at intel.com>
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2411
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>
Also maybe:
https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2261
> ---
> drivers/gpu/drm/xe/xe_sync.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
> index 533246f42256..3aa6270e5dd7 100644
> --- a/drivers/gpu/drm/xe/xe_sync.c
> +++ b/drivers/gpu/drm/xe/xe_sync.c
> @@ -259,7 +259,7 @@ void xe_sync_entry_cleanup(struct xe_sync_entry *sync)
> if (sync->fence)
> dma_fence_put(sync->fence);
> if (sync->chain_fence)
> - dma_fence_put(&sync->chain_fence->base);
> + dma_fence_chain_free(sync->chain_fence);
> if (sync->ufence)
> user_fence_put(sync->ufence);
> }
More information about the Intel-xe
mailing list