diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-04 17:12:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-10 00:01:56 +0300 |
commit | f55d17e9c3af7bf2fdb38c52a9abe4d4cfc0137c (patch) | |
tree | 215679453bc1a6d1bac88f0546f85d10deca0f2f /drivers/dma-buf | |
parent | 9ae85fabdfc0c74c2ac32219e116546e2a5a6309 (diff) | |
download | linux-f55d17e9c3af7bf2fdb38c52a9abe4d4cfc0137c.tar.xz |
dma-fence: Clear fence->status during dma_fence_init()
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 <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-1-chris@chris-wilson.co.uk
[s/dma_fence/fence/g - gregkh]
Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r-- | drivers/dma-buf/fence.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma-buf/fence.c b/drivers/dma-buf/fence.c index 4d51f9e83fa8..0f67d5294cd6 100644 --- a/drivers/dma-buf/fence.c +++ b/drivers/dma-buf/fence.c @@ -526,6 +526,7 @@ fence_init(struct fence *fence, const struct fence_ops *ops, fence->context = context; fence->seqno = seqno; fence->flags = 0UL; + fence->status = 0; trace_fence_init(fence); } |