On 2017年07月22日 00:20, Christian König wrote:
From: Christian König christian.koenig@amd.com
With hardware resets in mind it is possible that all shared fences are signaled, but the exlusive isn't. Fix waiting for everything in this situation.
Signed-off-by: Christian König christian.koenig@amd.com
drivers/dma-buf/reservation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c index e2eff86..ce3f9c1 100644 --- a/drivers/dma-buf/reservation.c +++ b/drivers/dma-buf/reservation.c @@ -461,7 +461,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj, } }
- if (!shared_count) {
- if (!fence) {
previous code seems be a bug, the exclusive fence isn't be waited at all if shared_count != 0.
With your fix, there still is a case the exclusive fence could be skipped, that when fobj->shared[shared_count-1] isn't signalled.
Regards, David Zhou
struct dma_fence *fence_excl = rcu_dereference(obj->fence_excl);
if (fence_excl &&
linaro-mm-sig@lists.linaro.org