From 79be96a22d7f6094a683ca22622f2de52755ac5b Mon Sep 17 00:00:00 2001 From: Praveen Chavan Date: Tue, 29 Sep 2015 02:25:47 -0700 Subject: AudioSystem: Fix race condition in accessing ioDescriptors The vector mIoDescriptors can be simultaneouly modified and accessed by 2 threads. Acquire a lock while wrapping the ioDescriptor in a sp<> Change-Id: I73c79ef8eca092b500a7ead3a5ebd0bcf75f9920 --- include/media/AudioSystem.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/media/AudioSystem.h') diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 06116a5..26a0bb2 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -399,6 +399,7 @@ private: uint32_t mInSamplingRate; audio_format_t mInFormat; audio_channel_mask_t mInChannelMask; + sp getIoDescriptor_l(audio_io_handle_t ioHandle); }; class AudioPolicyServiceClient: public IBinder::DeathRecipient, -- cgit v1.1