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 | 42246c89f1b37b150fe912f15aafb060de66af5d (patch) | |
tree | 57852d5092d0b65fd6278ea32488a994f5325faf /camera/inc/OMXCameraAdapter/OMXCameraAdapter.h | |
parent | 8bb8a56a981380ed19ee62ba9beeea69dc13556b (diff) | |
download | hardware_ti_omap4-42246c89f1b37b150fe912f15aafb060de66af5d.zip hardware_ti_omap4-42246c89f1b37b150fe912f15aafb060de66af5d.tar.gz hardware_ti_omap4-42246c89f1b37b150fe912f15aafb060de66af5d.tar.bz2 |
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 d85bc4f..ef3d6a0 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; |