]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: sync: Use proper barriers when waiting indefinitely
authorErik Gilling <konkers@android.com>
Fri, 1 Mar 2013 00:43:20 +0000 (16:43 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Mar 2013 09:46:54 +0000 (17:46 +0800)
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>
drivers/staging/android/sync.c

index 889ca6eb9d42769f7c126efbe3a2312e819bb127..811cf65eb3eb8032f27c80f4eee0476fe94dbe50 100644 (file)
@@ -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)