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: <c98f02a1-0153-496d-a484-0bac7acd030a@foss.st.com>
Date: Tue, 25 Nov 2025 14:36:27 +0100
From: Olivier MOYSAN <olivier.moysan@...s.st.com>
To: Johan Hovold <johan@...nel.org>,
        Arnaud Pouliquen
	<arnaud.pouliquen@...s.st.com>,
        Mark Brown <broonie@...nel.org>
CC: Liam Girdwood <lgirdwood@...il.com>, Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        <linux-sound@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <stable@...r.kernel.org>, olivier moysan <olivier.moysan@...com>,
        Wen Yang
	<yellowriver2010@...mail.com>
Subject: Re: [PATCH 1/4] ASoC: stm32: sai: fix device leak on probe

Hi Johan,

Thanks for your fixes.

On 11/24/25 11:49, Johan Hovold wrote:
> Make sure to drop the reference taken when looking up the sync provider
> device and its driver data during DAI probe on probe failures and on
> unbind.
> 
> Note that holding a reference to a device does not prevent its driver
> data from going away so there is no point in keeping the reference.
> 
> Fixes: 7dd0d835582f ("ASoC: stm32: sai: simplify sync modes management")
> Fixes: 1c3816a19487 ("ASoC: stm32: sai: add missing put_device()")
> Cc: stable@...r.kernel.org	# 4.16: 1c3816a19487
> Cc: olivier moysan <olivier.moysan@...com>
> Cc: Wen Yang <yellowriver2010@...mail.com>
> Signed-off-by: Johan Hovold <johan@...nel.org>

Reviewed-by: olivier moysan <olivier.moysan@...s.st.com>

> ---
>   sound/soc/stm/stm32_sai.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c
> index fa821e3fb427..7065aeb0e524 100644
> --- a/sound/soc/stm/stm32_sai.c
> +++ b/sound/soc/stm/stm32_sai.c
> @@ -143,6 +143,7 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client,
>   	}
>   
>   	sai_provider = platform_get_drvdata(pdev);
> +	put_device(&pdev->dev);
>   	if (!sai_provider) {
>   		dev_err(&sai_client->pdev->dev,
>   			"SAI sync provider data not found\n");
> @@ -159,7 +160,6 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client,
>   	ret = stm32_sai_sync_conf_provider(sai_provider, synco);
>   
>   error:
> -	put_device(&pdev->dev);
>   	of_node_put(np_provider);
>   	return ret;
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ