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] [day] [month] [year] [list]
Message-ID: <87ttor6bjk.wl-tiwai@suse.de>
Date:   Sat, 09 Dec 2023 09:10:55 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     Gergo Koteles <soyer@....hu>
Cc:     Shenghao Ding <shenghao-ding@...com>, Kevin Lu <kevin-lu@...com>,
        Baojun Xu <baojun.xu@...com>, Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, linux-kernel@...r.kernel.org,
        alsa-devel@...a-project.org, stable@...r.kernel.org
Subject: Re: [PATCH v2] ALSA: hda/tas2781: leave hda_component in usable state

On Fri, 08 Dec 2023 19:06:49 +0100,
Gergo Koteles wrote:
> 
> @@ -612,9 +612,13 @@ static void tas2781_hda_unbind(struct device *dev,
>  {
>  	struct tasdevice_priv *tas_priv = dev_get_drvdata(dev);
>  	struct hda_component *comps = master_data;
> +	comps = &comps[tas_priv->index];
>  
> -	if (comps[tas_priv->index].dev == dev)
> -		memset(&comps[tas_priv->index], 0, sizeof(*comps));
> +	if (comps->dev == dev) {
> +		comps->dev = NULL;
> +		strscpy(comps->name, "", sizeof(comps->name));

This looks suboptimal.  Either just set *comp->name = 0, or fill all
with memset().


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ