From: Erik Gilling Date: Fri, 1 Mar 2013 00:43:20 +0000 (-0800) Subject: staging: sync: Use proper barriers when waiting indefinitely X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4b5de08a37e8189c039424c92ca76ff605cf1c7f;p=openwrt%2Fstaging%2Fblogic.git staging: sync: Use proper barriers when waiting indefinitely The previous fix only addressed waiting with a timeout. Cc: Maarten Lankhorst Cc: Erik Gilling Cc: Daniel Vetter Cc: Rob Clark Cc: Sumit Semwal Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team Signed-off-by: Erik Gilling Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c index 889ca6eb9d42..811cf65eb3eb 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)