[PATCH] reservation: fix reservation_object_wait_timeout_rcu result

Christian König deathsimple at vodafone.de
Wed Oct 19 17:59:05 UTC 2016


From: Christian König <christian.koenig at amd.com>

Return one when the timeout is zero and we don't got any fences.

Fixes "reservation: revert "wait only with non-zero timeout specified (v3)"".

Signed-off-by: Christian König <christian.koenig at 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 bb97b04..debb91d 100644
--- a/drivers/dma-buf/reservation.c
+++ b/drivers/dma-buf/reservation.c
@@ -379,7 +379,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
 {
 	struct fence *fence;
 	unsigned seq, shared_count, i = 0;
-	long ret = timeout;
+	long ret = timeout ? timeout : 1;
 
 retry:
 	fence = NULL;
-- 
2.5.0



More information about the dri-devel mailing list