[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92159f51-2e17-4c6b-8fd4-0bde8b1dd38a@sirena.org.uk>
Date: Thu, 15 Jun 2023 01:56:35 +0100
From: Mark Brown <broonie@...nel.org>
To: yixuanjiang <yixuanjiang@...gle.com>
Cc: vkoul@...nel.org, lgirdwood@...il.com, perex@...ex.cz,
tiwai@...e.com, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] ASoC: soc-compress: Fix deadlock in soc_compr_open_fe
On Tue, Jun 13, 2023 at 02:23:50PM +0800, yixuanjiang wrote:
> Modify the error handling flow by release lock.
> The require pcm_mutex will keep holding if open fail.
> +++ 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:
This is really hard to follow due to the lack of any mutex_lock()s in
the function, I think because this is intended to undo
snd_soc_dpcm_mutex_lock(fe) but if that's the case why is it not using
snd_soc_dpcm_mutex_unlock(fe) like the success path does? Given the use
of classes not doing that looks like it'll create lockdep issues.
I'd expect the unlock to match the lock.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists