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]
Date:	Tue, 12 Apr 2011 11:17:39 +0800
From:	Harry Wei <jiaweiwei.xiyou@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	tim.gardner@...onical.com, linux-kernel@...r.kernel.org,
	petr@...drovec.name, viro@...iv.linux.org.uk, arnd@...db.de,
	npiggin@...nel.dk, jens.axboe@...cle.com, greg@...ah.com,
	joe@...ches.com
Subject: Re: [PATCH]initialize the array of fs/ncpfs/inode.c

On Mon, Apr 11, 2011 at 04:18:38PM -0700, Andrew Morton wrote:
> On Sun, 10 Apr 2011 18:08:18 +0800
> Harry Wei <jiaweiwei.xiyou@...il.com> wrote:
> 
> > fs/ncpfs/inode.c: In function 'ncp_fill_super':
> > fs/ncpfs/inode.c:451: warning: 'data.mounted_vol[1u]' may be used 
> 
> It's notabug, but we can easily fix it with a memset().
> 
> Reported-by: Harry Wei <jiaweiwei.xiyou@...il.com>
> Cc: Petr Vandrovec <petr@...drovec.name>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> 
>  fs/ncpfs/inode.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>  
> -	data.wdog_pid = NULL;
> +	memset(data, 0, sizeof(data));
Hi Morton,
	It really need a '&' for data, i think. So i have corrected
your patch like following.

Thanks.
Harry Wei.

Reported-by: Harry Wei <jiaweiwei.xiyou@...il.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Harry Wei <jiaweiwei.xiyou@...il.com>
---

 fs/ncpfs/inode.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff -puN fs/ncpfs/inode.c~fs-ncpfs-inodec-suppress-used-uninitialised-warning fs/ncpfs/inode.c
--- a/fs/ncpfs/inode.c~fs-ncpfs-inodec-suppress-used-uninitialised-warning
+++ a/fs/ncpfs/inode.c
@@ -461,7 +461,7 @@ static int ncp_fill_super(struct super_b
 #endif
       struct ncp_entry_info finfo;

-      data.wdog_pid = NULL;
+       memset(&data, 0, sizeof(data));
       server = kzalloc(sizeof(struct ncp_server), GFP_KERNEL);
       if (!server)
		return -ENOMEM;
@@ -496,7 +496,6 @@ static int ncp_fill_super(struct super_b
                               struct ncp_mount_data_v4* md = (struct ncp_mount_data_v4*)raw_data;

                               data.flags = md->flags;
-                               data.int_flags = 0;
                               data.mounted_uid = md->mounted_uid;
                               data.wdog_pid = find_get_pid(md->wdog_pid);
                               data.ncp_fd = md->ncp_fd;
@@ -507,7 +506,6 @@ static int ncp_fill_super(struct super_b
                               data.file_mode = md->file_mode;
                               data.dir_mode = md->dir_mode;
                               data.info_fd = -1;
-                               data.mounted_vol[0] = 0;
                       }
                       break;
               default:
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ