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

Commit ae975470 authored by Andy Hung's avatar Andy Hung
Browse files

AudioFlinger: Fix moveEffects deadlock

Occurs when srcThread and dstThread are identical.

Test: compiles
Bug: 346442777
Change-Id: Ic226cb68160fcb011594b2a07f1502fbc59b567a
parent a1c25c9e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4566,6 +4566,10 @@ NO_THREAD_SAFETY_ANALYSIS
            if ((pt->type() == IAfThreadBase::MIXER || pt->type() == IAfThreadBase::OFFLOAD) &&
                    ((sessionType & IAfThreadBase::EFFECT_SESSION) != 0)) {
                srcThread = pt.get();
                if (srcThread == dstThread) {
                    ALOGD("%s() same dst and src threads, ignoring move", __func__);
                    return NO_ERROR;
                }
                ALOGW("%s() found srcOutput %d hosting AUDIO_SESSION_OUTPUT_MIX", __func__,
                      pt->id());
                break;