From 7c7ad136255f8e6e052345ff073b7b3bdd34a04d Mon Sep 17 00:00:00 2001 From: Aditya Bavanari Date: Thu, 28 Nov 2019 20:35:44 +0530 Subject: [PATCH] dsp: voice: Remove common lock before sending unmap command Remove common mutex lock before invoking unmap physical memory command to avoid deadlock issue between voice lock and common lock in concurrency use cases. Change-Id: Iaca089f4ff1b6da16e0e59939088fb59516362aa Signed-off-by: Aditya Bavanari --- dsp/q6voice.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dsp/q6voice.c b/dsp/q6voice.c index e0491f1c703a..5e90104beee0 100644 --- a/dsp/q6voice.c +++ b/dsp/q6voice.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. */ #include #include @@ -1273,7 +1273,6 @@ static int voice_unmap_cal_block(struct voice_data *v, int cal_index) goto unlock; } - mutex_lock(&common.common_lock); result = voice_send_mvm_unmap_memory_physical_cmd( v, cal_block->map_data.q6map_handle); if (result) @@ -1281,7 +1280,6 @@ static int voice_unmap_cal_block(struct voice_data *v, int cal_index) __func__, v->session_id, result); cal_block->map_data.q6map_handle = 0; - mutex_unlock(&common.common_lock); unlock: mutex_unlock(&common.cal_data[cal_index]->lock); done: