sync: Fix race condition between merge and signal
authorØrjan Eide <orjan.eide@arm.com>
Wed, 5 Dec 2012 15:38:08 +0000 (16:38 +0100)
committer黄涛 <huangtao@rock-chips.com>
Fri, 22 Feb 2013 09:47:19 +0000 (17:47 +0800)
commitdf5c61bad036e7eaadaf7e303f71873aaf702d22
treef847f880ea3fbad277a606372da45a2dae114302
parentae739c14a784c926bba3e30f6254ec64aa57e501
sync: Fix race condition between merge and signal

The copied sync_pt was activated immediately. If the sync_pt was
signaled before the entire merge was completed, the new fence's pt_list
could be iterated over while it is still in the process of being
created.

Moving the the sync_pt_activate call for all new sync_pts to after both
the sync_fence_copy_pts and the sync_fence_merge_pts calls ensure that
the pt_list is complete and immutable before it can be reached from the
timeline's active list.

Signed-off-by: Erik Gilling <konkers@android.com>
drivers/base/sync.c