From 296066093b5f5ccf30a9c3b2047eb6a8875a88f0 Mon Sep 17 00:00:00 2001 From: Niv Yehezkel Date: Sat, 24 May 2014 10:28:07 -0400 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/android/sync.c | 4 ++++ 1 file changed, 4 insertions(+) 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(); /*