]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dma-buf: fix dma_fence_array_signaled v4
authorChristian König <christian.koenig@amd.com>
Fri, 8 Nov 2024 08:29:48 +0000 (09:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:33 +0000 (19:51 +0100)
commitf9f50a5792a67f144610dd0f3f2dbfc512b33704
treedba023c3408f708d0dbe0016d9ed6ae484ad0754
parentad34306ac6836e5dd096b7d0ad4aa20cb7c8d9e5
dma-buf: fix dma_fence_array_signaled v4

commit 78ac1c3558810486d90aa533b0039aa70487a3da upstream.

The function silently assumed that signaling was already enabled for the
dma_fence_array. This meant that without enabling signaling first we would
never see forward progress.

Fix that by falling back to testing each individual fence when signaling
isn't enabled yet.

v2: add the comment suggested by Boris why this is done this way
v3: fix the underflow pointed out by Tvrtko
v4: atomic_read_acquire() as suggested by Tvrtko

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12094
Cc: <stable@vger.kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241112121925.18464-1-christian.koenig@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma-buf/dma-fence-array.c