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]
Message-ID: <AM4PR0401MB17809B70577B49585C505312F69A0@AM4PR0401MB1780.eurprd04.prod.outlook.com>
Date:   Wed, 14 Dec 2016 12:05:06 +0000
From:   Pandy Gao <pandy.gao@....com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        Mark Brown <broonie@...nel.org>
CC:     "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] spi: fsl-lpspi: Pre-initialize ret in
 fsl_lpspi_transfer_one_msg()

> From: Geert Uytterhoeven [mailto:geert@...ux-m68k.org]
> Sent: Wednesday, December 14, 2016 7:21 PM
> To: Mark Brown <broonie@...nel.org>; Pandy Gao
> <pandy.gao@....com>
> Cc: linux-spi@...r.kernel.org; linux-kernel@...r.kernel.org; Geert
> Uytterhoeven <geert@...ux-m68k.org>
> Subject: [PATCH] spi: fsl-lpspi: Pre-initialize ret in
> fsl_lpspi_transfer_one_msg()
> 
> With gcc 4.1.2:
> 
>     drivers/spi/spi-fsl-lpspi.c: In function ‘fsl_lpspi_transfer_one_msg’:
>     drivers/spi/spi-fsl-lpspi.c:369: warning: ‘ret’ may be used uninitialized
> in this function
> 
> If the message contains no transfers, the function will set the message's
> status to an uninitialized value, and will return that uninitialized value.
> 
> While __spi_validate() should have been called in all paths leading to this,
> and thus have rejected such messages, we better pre-initialize ret to be
> safe for future modifications (spi_transfer_one_message() also does this).
> 
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---

Acked-by: Gao Pan <pandy.gao@....com>

Best Regards
Pandy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ