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]
Date:   Thu, 20 Sep 2018 09:19:05 -0700
From:   Mark Brown <broonie@...nel.org>
To:     Cheng-Yi Chiang <cychiang@...omium.org>
Cc:     linux-kernel@...r.kernel.org, ryans.lee@...imintegrated.com,
        alsa-devel@...a-project.org, dgreid@...omium.org
Subject: Re: [PATCH 2/2] ASoC: max98927: Add reset-gpio support

On Wed, Sep 12, 2018 at 08:19:55PM +0800, Cheng-Yi Chiang wrote:

> +	/*
> +	 * Release reset GPIO because we are not going to use it.
> +	 */
> +	devm_gpiod_put(dev, max98927->reset_gpio);

There is no need to do this, it's still potentially useful information
for userspace and it's also going to surprise anyone who tries to modify
the code to use this function at some other time (eg, when coming out of
suspend sometimes it's useful to reset the device).

> @@ -934,6 +1010,8 @@ static int max98927_i2c_probe(struct i2c_client *i2c,
>  	if (ret < 0)
>  		dev_err(&i2c->dev, "Failed to register component: %d\n", ret);
>  
> +	list_add(&max98927->list, &reset_list);
> +

I'm not seeing any locking of this list.  This also feels like something
that shouldn't be in this driver but should be pushed up a level - it's
only going to do the right thing if the reset line is only shared with
other devices using this driver, if someone does something like put the
CODEC and an external speaker amp on the same reset pin then it won't
work.  I'm not sure where the best place to do that is; drivers/reset
isn't really for this use case but feels right perhaps?

Can you perhaps split the basic reset handling out from this list
handling as a separate patch?

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ