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]
Date:   Sat, 4 Apr 2020 17:46:24 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Mircea Caprioru <mircea.caprioru@...log.com>
Cc:     <Michael.Hennerich@...log.com>, <alexandru.ardelean@...log.com>,
        <lars@...afoo.de>, <gregkh@...uxfoundation.org>,
        <linux-kernel@...r.kernel.org>, <linux-iio@...r.kernel.org>
Subject: Re: [PATCH] iio: core: Fix handling of 'dB'

On Wed, 1 Apr 2020 14:22:30 +0300
Mircea Caprioru <mircea.caprioru@...log.com> wrote:

> This patch fixes the call to iio_str_to_fixpoint when using 'dB' sufix.
> Before this the scale_db was not used when parsing the string written to
> the attribute and it failed with invalid value.
> 
> Fixes: b8528224741b ("iio: core: Handle 'dB' suffix in core")
> Signed-off-by: Mircea Caprioru <mircea.caprioru@...log.com>

Gah, I guess this messed up around the introduction of the character handling.

Applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan

> ---
>  drivers/iio/industrialio-core.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 157d95a24faa..7da9cd2a2b58 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -909,14 +909,11 @@ static ssize_t iio_write_channel_info(struct device *dev,
>  			return -EINVAL;
>  		integer = ch;
>  	} else {
> -		ret = iio_str_to_fixpoint(buf, fract_mult, &integer, &fract);
> +		ret = __iio_str_to_fixpoint(buf, fract_mult, &integer, &fract,
> +					    scale_db);
>  		if (ret)
>  			return ret;
>  	}
> -	ret = __iio_str_to_fixpoint(buf, fract_mult, &integer, &fract,
> -				    scale_db);
> -	if (ret)
> -		return ret;
>  
>  	ret = indio_dev->info->write_raw(indio_dev, this_attr->c,
>  					 integer, fract, this_attr->address);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ