summaryrefslogtreecommitdiff
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2016-10-19 15:48:32 -0200
committerSean Paul <seanpaul@chromium.org>2016-10-21 10:49:06 -0400
commit30cd85dd6edc86ea8d8589efb813f1fad41ef233 (patch)
tree687dad0ac7e30aee1796f77d5d41c9e1eff2624c /drivers/dma-buf
parentde1e211ff7b948b286222f592a5168746a7dc5e5 (diff)
dma-buf/sync_file: hold reference to fence when creating sync_file
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: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1476899313-22241-1-git-send-email-gustavo@padovan.org
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r--drivers/dma-buf/sync_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
index b29a9e817320..235f8ac113cc 100644
--- a/drivers/dma-buf/sync_file.c
+++ b/drivers/dma-buf/sync_file.c
@@ -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",
fence->ops->get_driver_name(fence),