Commit 3a83421d authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Greg Kroah-Hartman

dma-buf/sync_file: hold reference to fence when creating sync_file

commit 30cd85dd upstream.

fence referencing was out of balance. It was not taking any ref to the
fence at creating time, but it was putting a reference when freeing the
sync file.

This patch fixes the balancing issue by getting a reference for the fence
when creating the sync_file.
Signed-off-by: default avatarGustavo Padovan <>
Signed-off-by: default avatarSean Paul <>
Link: default avatarGreg Kroah-Hartman <>
parent 424bdc5d
......@@ -79,7 +79,7 @@ struct sync_file *sync_file_create(struct fence *fence)
if (!sync_file)
return NULL;
sync_file->fence = fence;
sync_file->fence = fence_get(fence);
snprintf(sync_file->name, sizeof(sync_file->name), "%s-%s%llu-%d",
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment