mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()
commit 95d35838880fb040ccb9fe4a48816bd0c8b62df5 upstream.
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: 1f70b8b812 ("dma-fence: Propagate errors to dma-fence-array container")
Cc: Chris Wilson <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: Gustavo Padovan <[email protected]>
Cc: Christian König <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: <[email protected]> # v5.4+
Signed-off-by: Thomas Hellström <[email protected]>
Reviewed-by: Christian König <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
e12f983c4a
commit
9e5bb22beb
1 changed files with 5 additions and 1 deletions
|
|
@ -104,7 +104,11 @@ static bool dma_fence_array_signaled(struct dma_fence *fence)
|
|||
{
|
||||
struct dma_fence_array *array = to_dma_fence_array(fence);
|
||||
|
||||
return atomic_read(&array->num_pending) <= 0;
|
||||
if (atomic_read(&array->num_pending) > 0)
|
||||
return false;
|
||||
|
||||
dma_fence_array_clear_pending_error(array);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void dma_fence_array_release(struct dma_fence *fence)
|
||||
|
|
|
|||
Loading…
Reference in a new issue