staging: sync: Protect unlocked access to fence status
authorErik Gilling <konkers@android.com>
Fri, 1 Mar 2013 00:43:18 +0000 (16:43 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Mar 2013 09:46:54 +0000 (17:46 +0800)
commitc679212dbfd060513e156133326122bf9f496579
tree45d7d131fb492e9ff268b36fed8f907b1771a7b8
parent7560645406b8341ab74644b505297e3e32fa6f3a
staging: sync: Protect unlocked access to fence status

Fence status is checked outside of locks in both sync_fence_wait and
sync_fence_poll.  This patch adds propper barrier protection in these
cases to avoid seeing stale status.

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