asoc: codecs: Add mutex lock for CPE session

Add mutex lock to ensure atomic access to core handle
in CPE alloc and dealloc sessions.

CRs-Fixed: 2169403
Change-Id: I7e046f349cc56ee06706cf15651dac3fdfe9d9a6
Signed-off-by: Vaishnavi Kommaraju <vkommara@codeaurora.org>
这个提交包含在:
Vaishnavi Kommaraju
2018-01-23 18:10:21 +05:30
提交者 Gerrit - the friendly Code Review server
父节点 da56c67bc4
当前提交 89d1a77802
修改 3 个文件,包含 19 行新增3 行删除

查看文件

@@ -1,4 +1,4 @@
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -606,8 +606,10 @@ static enum cpe_svc_result cpe_deregister_generic(struct cpe_info *t_info,
return CPE_SVC_INVALID_HANDLE;
}
CPE_SVC_GRAB_LOCK(&cpe_d.cpe_svc_lock, "cpe_svc");
list_del(&(n->list));
kfree(reg_handle);
CPE_SVC_REL_LOCK(&cpe_d.cpe_svc_lock, "cpe_svc");
return CPE_SVC_SUCCESS;
}