4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Chris Wilson <[email protected]>

commit 83dd1376fd92f33bdeca9e83d479534a4e7f870b upstream.

As the fence->status is an optional field that may be set before
dma_fence_signal() is called to convey that the fence completed with an
error, we have to ensure that it is always set to zero on initialisation
so that the typical use (i.e. unset) always flags a successful completion.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Sumit Semwal <[email protected]>
Signed-off-by: Sumit Semwal <[email protected]>
Link: 
http://patchwork.freedesktop.org/patch/msgid/[email protected]
[s/dma_fence/fence/g - gregkh]
Cc: Jisheng Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/dma-buf/fence.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/dma-buf/fence.c
+++ b/drivers/dma-buf/fence.c
@@ -526,6 +526,7 @@ fence_init(struct fence *fence, const st
        fence->context = context;
        fence->seqno = seqno;
        fence->flags = 0UL;
+       fence->status = 0;
 
        trace_fence_init(fence);
 }


Reply via email to