[lkml]   [2017]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.9 101/109] dma-buf/sync_file: hold reference to fence when creating sync_file
4.9-stable review patch.  If anyone has any objections, please let me know.


From: Gustavo Padovan <>

commit 30cd85dd6edc86ea8d8589efb813f1fad41ef233 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: Gustavo Padovan <>
Signed-off-by: Sean Paul <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/dma-buf/sync_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/dma-buf/sync_file.c
+++ b/drivers/dma-buf/sync_file.c
@@ -79,7 +79,7 @@ struct sync_file *sync_file_create(struc
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",

 \ /
  Last update: 2017-12-07 14:52    [W:0.430 / U:5.388 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site