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: <20170717104916.exhaspyska4okclc@dell>
Date:   Mon, 17 Jul 2017 11:49:16 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     Sebastian Reichel <sebastian.reichel@...labora.co.uk>
Cc:     Sebastian Reichel <sre@...nel.org>,
        Support Opensource <support.opensource@...semi.com>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        devicetree@...r.kernel.org, linux-hwmon@...r.kernel.org,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv4 1/4] mfd: da9052: fix manual ADC read after timed out
 read

On Fri, 30 Jun 2017, Sebastian Reichel wrote:

> It is possible that under heavy system load, the counter in the completion
> struct, used for waiting for end of AD conversion, gets incremented twice.
> To make sure the driver recovers from this situation, the completion struct
> should be reinitialized.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.co.uk>
> ---
>  drivers/mfd/da9052-core.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
> index a88c2065d8ab..977418ca9117 100644
> --- a/drivers/mfd/da9052-core.c
> +++ b/drivers/mfd/da9052-core.c
> @@ -386,6 +386,8 @@ int da9052_adc_manual_read(struct da9052 *da9052, unsigned char channel)
>  
>  	mutex_lock(&da9052->auxadc_lock);
>  
> +	reinit_completion(&da9052->done);
> +
>  	/* Channel gets activated on enabling the Conversion bit */
>  	mux_sel = chan_mux[channel] | DA9052_ADC_MAN_MAN_CONV;
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ