lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62fl655uwn4fevonuuhxs7rplpmcdgkghrivaihhptz3e6empc@snkbjhydc3mu>
Date: Sat, 7 Feb 2026 11:17:04 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
Cc: broonie@...nel.org, lgirdwood@...il.com, robh@...nel.org,
        krzk+dt@...nel.org, cnor+dt@...nel.org, srini@...nel.org,
        perex@...ex.cz, tiwai@...e.com, alexey.klimov@...aro.org,
        mohammad.rafi.shaik@....qualcomm.com, quic_wcheng@...cinc.com,
        johan@...nel.org, konrad.dybcio@....qualcomm.com,
        linux-arm-msm@...r.kernel.org, linux-sound@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Stable@...r.kernel.org
Subject: Re: [PATCH 02/10] ASoC: qcom: q6apm-lpass-dai: Fix multiple graph
 opens

On Thu, Feb 05, 2026 at 12:14:03PM -0500, Srinivas Kandagatla wrote:
> As prepare can be called mulitple times, this can result in multiple
> graph opens for playback path, fix this by checking if there is already a
> graph instance.
> 
> This will result in a memory leaks, fix this by adding a check before
> opening.

I think, the commit message should be improved by removing the first
'fix this' sentence.

> 
> Fixes: be1fae62cf25 ("ASoC: q6apm-lpass-dai: close graph on prepare errors")
> Cc: Stable@...r.kernel.org
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
> ---
>  sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
> index 528756f1332b..f68d4b4974f3 100644
> --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
> +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
> @@ -181,7 +181,7 @@ static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *substream, struct s
>  	 * It is recommend to load DSP with source graph first and then sink
>  	 * graph, so sequence for playback and capture will be different
>  	 */
> -	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
> +	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && dai_data->graph[dai->id] == NULL) {
>  		graph = q6apm_graph_open(dai->dev, NULL, dai->dev, graph_id);
>  		if (IS_ERR(graph)) {
>  			dev_err(dai->dev, "Failed to open graph (%d)\n", graph_id);
> -- 
> 2.47.3
> 

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ