]> Git Repo - linux.git/commitdiff
dma-buf/sync-file: fix logic error in new fence merge code
authorChristian König <[email protected]>
Tue, 29 Mar 2022 06:45:04 +0000 (08:45 +0200)
committerChristian König <[email protected]>
Tue, 29 Mar 2022 07:14:10 +0000 (09:14 +0200)
When the array is empty because everything is signaled we can't use
add_fence() to add something because that would filter the signaled
fence again.

Signed-off-by: Christian König <[email protected]>
Fixes: 519f490db07e ("dma-buf/sync-file: fix warning about fence containers")
Reviewed-by: Thomas Hellström <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/dma-buf/sync_file.c

index b8dea4ec123bd0c4494c57f3037e01616f2f48c5..514d213261df3d8f579dedec1269c353b84a7f0a 100644 (file)
@@ -262,7 +262,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
        }
 
        if (index == 0)
-               add_fence(fences, &index, dma_fence_get_stub());
+               fences[index++] = dma_fence_get_stub();
 
        if (num_fences > index) {
                struct dma_fence **tmp;
This page took 0.060721 seconds and 4 git commands to generate.