From: Niv Yehezkel Date: Sat, 24 May 2014 14:28:07 +0000 (-0400) Subject: staging: android: describe use of memory barrier on sync.c X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=296066093b5f5ccf30a9c3b2047eb6a8875a88f0;p=deliverable%2Flinux.git 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 --- 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(); /*