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

Skip to content
Commit fdb84b9f authored by Andy Hung's avatar Andy Hung
Browse files

RecordThread: Fix sp<> release with mutex held

The RecordThread activeTrack is now released at the end of each
read processing loop cycle, when the ThreadBase_Mutex is not held.

Prior to this, the activeTrack was being released when the new
activeTrack was determined (under lock). Occasionally
when the activeTrack changed and the prior cycle's activeTrack held
the last refCount, the RecordTrack dtor was called while the
ThreadBase_Mutex was held, resulting in a lock
order inversion when the TrackBase's client sp<> is released.

Test: compiles
Bug: 329604636
Merged-In: Ib971dd48098207d2bbc78670bfcf8e14e70efb3f
Change-Id: Ib971dd48098207d2bbc78670bfcf8e14e70efb3f
parent afc36e91
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