platform_hardware_interfaces/biometrics/fingerprint/2.1/default
Nick Desaulniers e637aa32b8 biometrics: fingerprint: add locking to default impl
There exists the following race condition:
a). thread A receives setNotify and sets the callback to some object
b). thread B of the wrapped implementation calls
BiometricsFingerprint::notify which it was given a handle to. Thread B
executes past the nullptr check:
c). thread A receives setNotify and sets the callback to some other
object (or nullptr)
d). thread B resumes in notify with unknown state

Add mutex to protect access to mClientCallback.

Change-Id: I9163204ff5802e9246056caeb2a7857e6138531c
Fixes: 64802340
Test: VtsHalBiometricsFingerprintV2_1IfaceFuzzer
2017-08-18 17:14:53 +00:00
..
android.hardware.biometrics.fingerprint@2.1-service.rc Move hidl shims to the vendor partition. (2/2) 2017-02-13 15:03:41 -08:00
Android.mk fingerprint: clean up includes 2017-04-13 16:13:47 -07:00
BiometricsFingerprint.cpp biometrics: fingerprint: add locking to default impl 2017-08-18 17:14:53 +00:00
BiometricsFingerprint.h biometrics: fingerprint: add locking to default impl 2017-08-18 17:14:53 +00:00
service.cpp IBiometricsFingerprint uses "default" service name 2017-03-16 15:39:08 -07:00