summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/sync.c
diff options
context:
space:
mode:
authorNiv Yehezkel2014-05-24 16:28:07 +0200
committerGreg Kroah-Hartman2014-05-25 20:09:14 +0200
commit296066093b5f5ccf30a9c3b2047eb6a8875a88f0 (patch)
treebc4e5ab3f1ddd38c6f0e874c59fbf615d40ca345 /drivers/staging/android/sync.c
parentStaging: dgap: Fixed iomem accesses in dgap.c (diff)
downloadkernel-qcow2-linux-296066093b5f5ccf30a9c3b2047eb6a8875a88f0.tar.gz
kernel-qcow2-linux-296066093b5f5ccf30a9c3b2047eb6a8875a88f0.tar.xz
kernel-qcow2-linux-296066093b5f5ccf30a9c3b2047eb6a8875a88f0.zip
staging: android: describe use of memory barrier on sync.c
Added comments describing the purpose of using write memory barrier in the context of sync_timeline_destory. Signed-off-by: Niv Yehezkel <executerx@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/sync.c')
-rw-r--r--drivers/staging/android/sync.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 1f88c5d0f0c7..18174f7c871c 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -92,6 +92,10 @@ static void sync_timeline_free(struct kref *kref)
void sync_timeline_destroy(struct sync_timeline *obj)
{
obj->destroyed = true;
+ /*
+ * Ensure timeline is marked as destroyed before
+ * changing timeline's fences status.
+ */
smp_wmb();
/*