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:   Sun, 3 Nov 2019 10:46:23 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Alexandru Ardelean <alexandru.ardelean@...log.com>
Cc:     <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <lars@...afoo.de>, <Michael.Hennerich@...log.com>,
        <dragos.bogdan@...log.com>
Subject: Re: [PATCH 09/10] iio: imu: adis: assign read val in debugfs hook
 only if op successful

On Fri, 1 Nov 2019 11:35:04 +0200
Alexandru Ardelean <alexandru.ardelean@...log.com> wrote:

> This was also caught by the `-Wmaybe-uninitialized` warning, which
> (ironically as-is) it makes quite a lot of sense to do for this.
> 
> Fixes: 78026a6fde8f7 ("iio:imu:adis: Add debugfs register access support")
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
This one is protected against any actual results in the caller of the
function, so I've added a not again to say this is not stable material.

Need to do this explicitly to avoid it getting picked up in efforts
to catch fixes that should have been tagged.

Thanks,

Jonathan

> ---
>  drivers/iio/imu/adis.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
> index dc2f9e061d98..85de565a4e80 100644
> --- a/drivers/iio/imu/adis.c
> +++ b/drivers/iio/imu/adis.c
> @@ -229,7 +229,8 @@ int adis_debugfs_reg_access(struct iio_dev *indio_dev,
>  		int ret;
>  
>  		ret = adis_read_reg_16(adis, reg, &val16);
> -		*readval = val16;
> +		if (ret == 0)
> +			*readval = val16;
>  
>  		return ret;
>  	} else {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ