Skip to contentSkip to conversation

reservation: fix reservation_object_wait_timeout_rcu result

PATCH In review Christian König 2 participants 2 messages Oct 19, 2016 DMA buffer sharing framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reservation: fix reservation_object_wait_timeout_rcu result

From: Christian König <[email protected]>

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)"".

---
 drivers/dma-buf/reservation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/reservation.c +1 -1
index bb97b04..debb91d 100644
@@ -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;
Signature · 6 lines
2.5.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Christian König

From: Christian König <[email protected]>

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)"".

You should make sure you cc Sumit on these patches as I think they
would need to go upstream via the dma-buf tree. Also respin a v2
with this fix integrated.

Alex

Quoted 20 lines
---
 drivers/dma-buf/reservation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/reservation.c +1 -2
index bb97b04..debb91d 100644
@@ -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

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel