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  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:   Thu, 09 Nov 2017 09:29:14 +0530
From:   Chandan Rajendra <chandan@...ux.vnet.ibm.com>
To:     Miklos Szeredi <miklos@...redi.hu>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: build warning after merge of the overlayfs tree

On Thursday, November 9, 2017 4:03:06 AM IST Stephen Rothwell wrote:
> Hi Miklos,
> 
> After merging the overlayfs tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> fs/overlayfs/super.c: In function 'ovl_fill_super':
> fs/overlayfs/super.c:1070:25: warning: 'numlower' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   unsigned int stacklen, numlower, i;
>                          ^
> fs/overlayfs/super.c:1069:15: warning: 'stack' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   struct path *stack;
>                ^
> 
> 

The following trivial patch resolves the warnings,

diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index fd11c05..602e686 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -1066,8 +1066,8 @@ static struct ovl_entry *ovl_get_lowerstack(struct super_block *sb,
 {
        int err;
        char *lowertmp, *lower;
-       struct path *stack;
-       unsigned int stacklen, numlower, i;
+       struct path *stack = NULL;
+       unsigned int stacklen, numlower = 0, i;
        bool remote = false;
        struct ovl_entry *oe;
 
-- 
chandan

Powered by blists - more mailing lists