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: <af3ea27a-5940-5279-5590-fe7a42bdfdfa@linaro.org>
Date:   Thu, 6 Jul 2023 12:09:34 +0100
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Johan Hovold <johan+linaro@...nel.org>,
        Mark Brown <broonie@...nel.org>, Vinod Koul <vkoul@...nel.org>
Cc:     Bard Liao <yung-chuan.liao@...ux.intel.com>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        Sanyog Kale <sanyog.r.kale@...el.com>,
        Banajit Goswami <bgoswami@...cinc.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 5/8] ASoC: codecs: wcd934x: fix resource leaks on
 component remove



On 05/07/2023 13:30, Johan Hovold wrote:
> Make sure to release allocated MBHC resources also on component remove.
> 
> This is specifically needed to allow probe deferrals of the sound card
> which otherwise fails when reprobing the codec component.
> 
> Fixes: 9fb9b1690f0b ("ASoC: codecs: wcd934x: add mbhc support")
> Cc: stable@...r.kernel.org      # 5.14
> Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
> ---

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>

>   sound/soc/codecs/wcd934x.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c
> index a17cd75b969b..1b6e376f3833 100644
> --- a/sound/soc/codecs/wcd934x.c
> +++ b/sound/soc/codecs/wcd934x.c
> @@ -3044,6 +3044,17 @@ static int wcd934x_mbhc_init(struct snd_soc_component *component)
>   
>   	return 0;
>   }
> +
> +static void wcd934x_mbhc_deinit(struct snd_soc_component *component)
> +{
> +	struct wcd934x_codec *wcd = snd_soc_component_get_drvdata(component);
> +
> +	if (!wcd->mbhc)
> +		return;
> +
> +	wcd_mbhc_deinit(wcd->mbhc);
> +}
> +
>   static int wcd934x_comp_probe(struct snd_soc_component *component)
>   {
>   	struct wcd934x_codec *wcd = dev_get_drvdata(component->dev);
> @@ -3077,6 +3088,7 @@ static void wcd934x_comp_remove(struct snd_soc_component *comp)
>   {
>   	struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev);
>   
> +	wcd934x_mbhc_deinit(comp);
>   	wcd_clsh_ctrl_free(wcd->clsh_ctrl);
>   }
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ