Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Reverts commit fb8b7d2b9d80
("reservation: wait only with non-zero timeout specified (v3)")

Otherwise signaling might never be activated on the fences. This can
result in infinite waiting with hardware which has unreliable interrupts.

v2: still return one when the timeout is zero and we don't have any fences.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
[sumits: fix checkpatch warnings]
Link: http://patchwork.freedesktop.org/patch/msgid/1478553376-18575-4-git-send-email-alexander.deucher@amd.com

authored by

Christian König and committed by
Sumit Semwal
06a66b5c 98a6dd90

+1 -4
+1 -4
drivers/dma-buf/reservation.c
··· 370 370 { 371 371 struct dma_fence *fence; 372 372 unsigned seq, shared_count, i = 0; 373 - long ret = timeout; 374 - 375 - if (!timeout) 376 - return reservation_object_test_signaled_rcu(obj, wait_all); 373 + long ret = timeout ? timeout : 1; 377 374 378 375 retry: 379 376 fence = NULL;