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
| ||
|
Message-ID: <CAK8P3a3wfVpabQHOOpZ-XCqkar+U49rT=MHGrMdEQiVw+KdNHA@mail.gmail.com> Date: Thu, 16 Nov 2017 12:35:12 +0100 From: Arnd Bergmann <arnd@...db.de> To: Geert Uytterhoeven <geert@...ux-m68k.org> Cc: Ursula Braun <ubraun@...ux.vnet.ibm.com>, "David S . Miller" <davem@...emloft.net>, linux-s390 <linux-s390@...r.kernel.org>, Networking <netdev@...r.kernel.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] net/smc: Fix preinitialization of buf_desc in __smc_buf_create() On Thu, Nov 16, 2017 at 12:22 PM, Geert Uytterhoeven <geert@...ux-m68k.org> wrote: > With gcc-4.1.2: > > net/smc/smc_core.c: In function ‘__smc_buf_create’: > net/smc/smc_core.c:567: warning: ‘bufsize’ may be used uninitialized in this function > > Indeed, if the for-loop is never executed, bufsize is used > uninitialized. In addition, buf_desc is stored for later use, while it > is still a NULL pointer. > > Before, error handling was done by checking if buf_desc is non-NULL. > The cleanup changed this to an error check, but forgot to update the > preinitialization of buf_desc to an error pointer. > > Update the preinitializatin of buf_desc to fix this. > > Fixes: b33982c3a6838d13 ("net/smc: cleanup function __smc_buf_create()") > Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org> > --- > I don't know if this can ever happen, but the old code handled it. Acked-by: Arnd Bergmann <arnd@...db.de> This one I could reproduce with gcc-4.1 on x86, but not gcc-4.2 or higher.
Powered by blists - more mailing lists