[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230613062350.271107-1-yixuanjiang@google.com>
Date: Tue, 13 Jun 2023 14:23:50 +0800
From: yixuanjiang <yixuanjiang@...gle.com>
To: vkoul@...nel.org, lgirdwood@...il.com, broonie@...nel.org,
perex@...ex.cz, tiwai@...e.com
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
yixuanjiang <yixuanjiang@...gle.com>, stable@...r.kernel.org
Subject: [PATCH] ASoC: soc-compress: Fix deadlock in soc_compr_open_fe
Modify the error handling flow by release lock.
The require pcm_mutex will keep holding if open fail.
Fixes: aa9ff6a4955f ("ASoC: soc-compress: Reposition and add pcm_mutex")
Signed-off-by: yixuanjiang <yixuanjiang@...gle.com>
Cc: stable@...r.kernel.org # v5.15+
---
sound/soc/soc-compress.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 256e45001f85..b6727b91dd85 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -166,6 +166,7 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
snd_soc_dai_compr_shutdown(cpu_dai, cstream, 1);
out:
dpcm_path_put(&list);
+ mutex_unlock(&fe->card->pcm_mutex);
be_err:
fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
mutex_unlock(&fe->card->mutex);
--
2.41.0.162.gfafddb0af9-goog
Powered by blists - more mailing lists