diff options
author | Tyler Luu <tluu@ti.com> | 2011-08-30 10:06:39 +0300 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-08-31 20:02:33 -0700 |
commit | d55379a7e975f992db1d10bba425f456447d14a8 (patch) | |
tree | 5864eb4c10d22de853691b153495475c38eed410 /camera/inc/OMXCameraAdapter/OMXCameraAdapter.h | |
parent | 3a1541be51a8cc8dcc92a4ea1f0fa4a1c80990ce (diff) | |
download | omap4xxx-omapzoom-d55379a7e975f992db1d10bba425f456447d14a8.tar.gz |
CameraHAL: Adds locking when accessing 'mFocusAreas'
- This is due to the access pattern of 'mFocusAreas.
Currently both 'setFocusMode()' and
'setParametersFocus()' can in parallel try to
write/read from this Vector. A race condition is
possible, in which the former method can clear a
focus area, while the latter method is trying to
increment its strong pointer. This will inevitably
result in a segfault.
Change-Id: I0e94d18326b85c20f73296d31d980b9c39685c32
Original-author: Emilian Peev <epeev@mm-sol.com>
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Signed-off-by: Tyler Luu <tluu@ti.com>
Diffstat (limited to 'camera/inc/OMXCameraAdapter/OMXCameraAdapter.h')
-rw-r--r-- | camera/inc/OMXCameraAdapter/OMXCameraAdapter.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h index d85bc4fb..ef3d6a0c 100644 --- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h +++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h @@ -725,6 +725,7 @@ private: // Current Focus areas Vector< sp<CameraArea> > mFocusAreas; + mutable Mutex mFocusAreasLock; CaptureMode mCapMode; size_t mBurstFrames; |