dsp: lsm: move lsm_common deregister out of mutex_lock
When dispatch_event in apr and q6lsm_client_free in q6lsm are running concurrently, there may be deadlock between session_lock in lsm and svc->m_lock in apr for lsm_common. Move lsm_common mmap apr deregister out of mutex_lock to avoid deadlock. Change-Id: I7c96ba12834bd4a7c8e5ca1b78d798578678b251 Signed-off-by: Meng Wang <mengw@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

父節點
f138524159
當前提交
a801ad8fd7
@@ -376,10 +376,10 @@ void q6lsm_client_free(struct lsm_client *client)
|
||||
return;
|
||||
}
|
||||
apr_deregister(client->apr);
|
||||
q6lsm_mmap_apr_dereg();
|
||||
client->mmap_apr = NULL;
|
||||
mutex_lock(&session_lock);
|
||||
q6lsm_session_free(client);
|
||||
q6lsm_mmap_apr_dereg();
|
||||
mutex_destroy(&client->cmd_lock);
|
||||
kfree(client);
|
||||
client = NULL;
|
||||
|
Reference in New Issue
Block a user