diff mbox

[24/30] staging: sync: Use proper barriers when waiting indefinitely

Message ID 1362098606-26469-25-git-send-email-john.stultz@linaro.org
State Accepted
Commit 4b5de08a37e8189c039424c92ca76ff605cf1c7f
Headers show

Commit Message

John Stultz March 1, 2013, 12:43 a.m. UTC
From: Erik Gilling <konkers@android.com>

The previous fix only addressed waiting with a timeout.

Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <robclark@gmail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: dri-devel@lists.freedesktop.org
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 drivers/staging/android/sync.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 889ca6e..811cf65 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -588,7 +588,8 @@  int sync_fence_wait(struct sync_fence *fence, long timeout)
 						       sync_fence_check(fence),
 						       timeout);
 	} else if (timeout < 0) {
-		err = wait_event_interruptible(fence->wq, fence->status != 0);
+		err = wait_event_interruptible(fence->wq,
+					       sync_fence_check(fence));
 	}
 
 	if (err < 0)