Commit 424bdc5d authored by Dominik Behr's avatar Dominik Behr Committed by Greg Kroah-Hartman

dma-buf/sw_sync: force signal all unsignaled fences on dying timeline

commit ea4d5a27 upstream.

To avoid hanging userspace components that might have been waiting on the
active fences of the destroyed timeline we need to signal with error all
remaining fences on such timeline.

This restore the default behaviour of the Android sw_sync framework, which
Android still relies on. It was broken on the dma fence conversion a few
years ago and never fixed.

v2: Do not bother with cleanup do the list (Chris Wilson)
Reviewed-by: default avatarChris Wilson <>
Signed-off-by: default avatarDominik Behr <>
Signed-off-by: default avatarGustavo Padovan <>
[s/dma_fence/fence/g - gregkh]
Cc: Jisheng Zhang <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent f5e0724e
......@@ -321,8 +321,16 @@ static int sw_sync_debugfs_open(struct inode *inode, struct file *file)
static int sw_sync_debugfs_release(struct inode *inode, struct file *file)
struct sync_timeline *obj = file->private_data;
struct sync_pt *pt, *next;
list_for_each_entry_safe(pt, next, &obj->pt_list, link) {
fence_set_error(&pt->base, -ENOENT);
return 0;
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