Add missing barriers to Bakery Locks
With the current implementation, it's possible for a contender to
observe accesses in the Critical Section before acquiring or releasing
the lock. Insert fencing in the locking and release codes to prevent any
reorder.

Fixes ARM-software/tf-issues#609

Change-Id: I773b82aa41dd544a2d3dbacb9a4b42c9eb767bbb
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
1 parent e43422b commit 24dc97091532751ea810e99bd5a9be33514decf6
@Jeenu Viswambharan Jeenu Viswambharan authored on 8 Aug 2018
Showing 2 changed files
View
lib/locks/bakery/bakery_lock_coherent.c
View
lib/locks/bakery/bakery_lock_normal.c