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: <s5hmu2qhele.wl-tiwai@suse.de>
Date:   Wed, 19 Aug 2020 16:53:17 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Sameer Pujar <spujar@...dia.com>
Cc:     <tiwai@...e.com>, <perex@...ex.cz>, <kai.vehmanen@...ux.intel.com>,
        <yang.jie@...ux.intel.com>, <pierre-louis.bossart@...ux.intel.com>,
        <alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>,
        <stable@...r.kernel.org>
Subject: Re: [PATCH] ALSA: hda: avoid reset of sdo_limit

On Wed, 19 Aug 2020 16:44:33 +0200,
Sameer Pujar wrote:
> 
> By default 'sdo_limit' is initialized with a default value of '8'
> as per spec. This is overridden in cases where a different value is
> required. However this is getting reset when snd_hdac_bus_init_chip()
> is called again, which happens during runtime PM cycle. Avoid reset
> by not initializing to default value everytime.
> 
> Fixes: 67ae482a59e9 ("ALSA: hda: add member to store ratio for stripe control")
> Cc: <stable@...r.kernel.org>
> Signed-off-by: Sameer Pujar <spujar@...dia.com>

How about to move the default sdo_limit setup into snd_hdac_bus_init()
instead?  That's the place to be called only once.


thanks,

Takashi


> ---
>  sound/hda/hdac_controller.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c
> index 011b17c..0e26e96 100644
> --- a/sound/hda/hdac_controller.c
> +++ b/sound/hda/hdac_controller.c
> @@ -538,7 +538,8 @@ bool snd_hdac_bus_init_chip(struct hdac_bus *bus, bool full_reset)
>  	 *   { ((num_channels * bits_per_sample * rate/48000) /
>  	 *	number of SDOs) >= 8 }
>  	 */
> -	bus->sdo_limit = 8;
> +	if (!bus->sdo_limit)
> +		bus->sdo_limit = 8;
>  
>  	return true;
>  }
> -- 
> 2.7.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ