Skip to content

Commit

Permalink
staging: sync: Use proper barriers when waiting indefinitely
Browse files Browse the repository at this point in the history
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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Erik Gilling authored and Greg Kroah-Hartman committed Mar 4, 2013
1 parent eeb2f57 commit 4b5de08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/android/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4b5de08

Please sign in to comment.