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:   Mon, 30 Sep 2019 18:50:44 +0000
From:   Pascal Van Leeuwen <pvanleeuwen@...imatrix.com>
To:     Arnd Bergmann <arnd@...db.de>,
        Antoine Tenart <antoine.tenart@...tlin.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>
CC:     Pascal van Leeuwen <pascalvanl@...il.com>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/3] crypto: inside-secure - Fix a maybe-uninitialized
 warning

> -----Original Message-----
> From: Arnd Bergmann <arnd@...db.de>
> Sent: Monday, September 30, 2019 2:15 PM
> To: Antoine Tenart <antoine.tenart@...tlin.com>; Herbert Xu <herbert@...dor.apana.org.au>;
> David S. Miller <davem@...emloft.net>
> Cc: Arnd Bergmann <arnd@...db.de>; Pascal Van Leeuwen <pvanleeuwen@...imatrix.com>; Pascal van
> Leeuwen <pascalvanl@...il.com>; linux-crypto@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH 1/3] crypto: inside-secure - Fix a maybe-uninitialized warning
> 
> A previous fixup avoided an unused variable warning but replaced
> it with a slightly scarier warning:
> 
> drivers/crypto/inside-secure/safexcel.c:1100:6: error: variable 'irq' is used uninitialized
> whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
> 
> This is harmless as it is impossible to get into this case, but
> the compiler has no way of knowing that. Add an explicit error
> handling case to make it obvious to both compilers and humans
> reading the source.
> 
> Fixes: 212ef6f29e5b ("crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/crypto/inside-secure/safexcel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
> index 4ab1bde8dd9b..311bf60df39f 100644
> --- a/drivers/crypto/inside-secure/safexcel.c
> +++ b/drivers/crypto/inside-secure/safexcel.c
> @@ -1120,6 +1120,8 @@ static int safexcel_request_ring_irq(void *pdev, int irqid,
>  				irq_name, irq);
>  			return irq;
>  		}
> +	} else {
> +		return -ENXIO;
>  	}
> 
>  	ret = devm_request_threaded_irq(dev, irq, handler,
> --
> 2.20.0

Ok, this won't hurt in any way I guess, so fine by me (assuming that error
code makes sense).

Acked-by: Pascal van Leeuwen <pvanleeuwen@...imatrix.com>


Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ