From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E8D6CA0EC0 for ; Mon, 11 Sep 2023 21:31:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348524AbjIKV1L (ORCPT ); Mon, 11 Sep 2023 17:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238657AbjIKOBv (ORCPT ); Mon, 11 Sep 2023 10:01:51 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77E5BCD7 for ; Mon, 11 Sep 2023 07:01:47 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C432EC433C7; Mon, 11 Sep 2023 14:01:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694440907; bh=6qCkiht6I/0j8ufb6ruEfp2U1NkcMXSHwqEfbdXwwAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XuHA0iQRIPwlozebqGfUDFOPMwSq6PBFkYMRKCEgBVwrLsR02lHFUL41r6mxyv7qL 4pqsIo97vcAvbctc6EECf3d/wF6sUdxl8jflk0SYGELhG4m3Y4gjEJ8f9LAzvI7kRG 6GyhEmgxs0fS6DPYs64ovCFtv4JVyuqRrCh9c/P4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, yixuanjiang , Mark Brown , Sasha Levin Subject: [PATCH 6.5 201/739] ASoC: soc-compress: Fix deadlock in soc_compr_open_fe Date: Mon, 11 Sep 2023 15:40:00 +0200 Message-ID: <20230911134656.799523082@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230911134650.921299741@linuxfoundation.org> References: <20230911134650.921299741@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: yixuanjiang [ Upstream commit 2222214749a9969e09454b9ba7febfdfb09c1c8d ] Modify the error handling flow by release lock. The require mutex will keep holding if open fail. Fixes: aa9ff6a4955f ("ASoC: soc-compress: Reposition and add pcm_mutex") Signed-off-by: yixuanjiang Link: https://lore.kernel.org/r/20230619033127.2522477-1-yixuanjiang@google.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 02fdb683f75f3..b58921e7921f8 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -193,6 +193,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); + snd_soc_dpcm_mutex_unlock(fe); be_err: fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; snd_soc_card_mutex_unlock(fe->card); -- 2.40.1