]> git.baikalelectronics.ru Git - kernel.git/commit
dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Mon, 29 Nov 2021 15:27:27 +0000 (16:27 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 30 Nov 2021 06:46:24 +0000 (07:46 +0100)
commit6dda01e38e41fe3503b493f9ae48c2426aa1b89d
tree96bbf4e9a8ac0e5a9bbbd430cc7a84bf3facbab9
parente362f4f4855c6dd69ecd1dfcf29cd190deb8e7b9
dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()

If a dma_fence_array is reported signaled by a call to
dma_fence_is_signaled(), it may leak the PENDING_ERROR status.

Fix this by clearing the PENDING_ERROR status if we return true in
dma_fence_array_signaled().

v2:
- Update Cc list, and add R-b.

Fixes: f579c03be027 ("dma-fence: Propagate errors to dma-fence-array container")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Christian König <christian.koenig@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: <stable@vger.kernel.org> # v5.4+
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211129152727.448908-1-thomas.hellstrom@linux.intel.com
drivers/dma-buf/dma-fence-array.c