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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18f646c0-00f3-4460-842d-cf8811dddecf@kernel.org>
Date: Fri, 2 Jan 2026 12:31:21 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Johan Hovold <johan@...nel.org>, Srinivas Kandagatla <srini@...nel.org>,
 Mark Brown <broonie@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>, linux-sound@...r.kernel.org,
 linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
 stable@...r.kernel.org
Subject: Re: [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation

On 02/01/2026 12:14, Johan Hovold wrote:
> The soundwire update_status() callback may be called multiple times with
> the same ATTACHED status but initialisation should only be done when
> transitioning from UNATTACHED to ATTACHED.
> 
> Fix the inverted hw_init flag which was set to false instead of true
> after initialisation which defeats its purpose and may result in
> repeated unnecessary initialisation.

Either it results or it does not, not "may". If the device moves to
UNATTACHED state flag should be probably set to "true". This is the bug.

> 
> Similarly, the initial state of the flag was also inverted so that the
> codec would only be initialised and brought out of regmap cache only
> mode if its status first transitions to UNATTACHED.


Maybe that's confusing wording but existing code was intentional and IMO
almost correct. The flag is saying - we need hw init - that's why it is
set to true in the probe and to false AFTER the proper hw initialization
which is done after ATTACHED state.

If you find naming confusing, maybe rename it to other style or fix the
false -> true when going to unattached stat, but not everything at once.


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ