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

Skip to content
Commit 330c8e3f authored by Ravi Kumar Alamanda's avatar Ravi Kumar Alamanda Committed by Vineeta Srivastava
Browse files

libmediaplayerservice: fix deadlock in dump()

Issue: Calling dump function while the media clients
(sessions) are created and destroyed will result in a deadlock.

Description: MediaPlayerService::dump() takes Mutex while calling
client::dump() and right after that the strong reference to client
is cleared. If there are no references to client object at this moment
(which is the case if multiple audio sessions are created and destroyed)
then the client destructor gets called which tries to take
the same Mutex resulting in a deadlock.

Fix: Take a strong reference to client objects and release them only
after releasing the Mutex.

Bug: 18700631

Author: Sidipotu Ashok<sashok@codeaurora.org>

Change-Id: I82c89771de352d2f0d914eb0a3b9fc7bfb6116b0
parent bf31b330
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