Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6e51290 authored by Jie Feng's avatar Jie Feng
Browse files

soc: qcom: hgsl: remove fence from timeline list on fence release



In case user close fence fd before the fence has been signaled,
we need to make sure to delete it from timeline list before free it.

Change-Id: I1d45110c589e2826ad25367c701c1508ec871e05
Signed-off-by: default avatarJie Feng <jiefeng@codeaurora.org>
parent e853601f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -171,8 +171,12 @@ static void hgsl_hsync_fence_release(struct dma_fence *base)
			container_of(base, struct hgsl_hsync_fence, fence);
	struct hgsl_hsync_timeline *timeline = fence->timeline;

	if (timeline)
	if (timeline) {
		spin_lock(&timeline->lock);
		list_del_init(&fence->child_list);
		spin_unlock(&timeline->lock);
		hgsl_hsync_timeline_put(timeline);
	}
	kfree(fence);
}