Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2a6e1b02 authored by Mateusz Kaplon's avatar Mateusz Kaplon Committed by Shuhei Miyazaki
Browse files

AudioFlinger: improve purgeStaleEffects_l thread-safety

There was a situation when a thread in audioserver
called ThreadBase::disconnectEffectHandle that would
remove effect chain objects from system in the same
time that purgeStaleEffects_l would do effect chain
discovery. This caused race conditions and crash
in purgeStaleEffects_l.

This patch fixes that by putting code that handles
discovery of effect chains in playback and record threads
under mutex of currently checked ThreadBase. This
ensures that any other thread that currently removes
effect objects from system finishes before
purgeStaleEffects_l proceeds with effect discovery.

Bug: 65535528
Test: Check Audio Effects works correctly.
Change-Id: Ia7daac6aaf16c4099ef569e3d438197ac7aad5d4
parent 69545369
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment