diff mbox series

dma-buf/sw_sync: remove points on release prior to signaling

Message ID 20190214182456.16871-1-lionel.g.landwerlin@intel.com (mailing list archive)
State New, archived
Headers show
Series dma-buf/sw_sync: remove points on release prior to signaling | expand

Commit Message

kernel test robot via dri-devel Feb. 14, 2019, 6:24 p.m. UTC
Much like the sync_timeline_signal(), remove the points from the
timeline so that if the callee is dropping the last reference on the
point's fence we don't end up in a deadlock in
timeline_fence_release().

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/dma-buf/sw_sync.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/dma-buf/sw_sync.c b/drivers/dma-buf/sw_sync.c
index 32dcf7b4c935..78c1c25cab7b 100644
--- a/drivers/dma-buf/sw_sync.c
+++ b/drivers/dma-buf/sw_sync.c
@@ -325,6 +325,9 @@  static int sw_sync_debugfs_release(struct inode *inode, struct file *file)
 	spin_lock_irq(&obj->lock);
 
 	list_for_each_entry_safe(pt, next, &obj->pt_list, link) {
+		list_del_init(&pt->link);
+		rb_erase(&pt->node, &obj->pt_tree);
+
 		dma_fence_set_error(&pt->base, -ENOENT);
 		dma_fence_signal_locked(&pt->base);
 	}