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>] [day] [month] [year] [list]
Date:	Sun, 8 May 2011 22:49:15 -0700
From:	Connor H <cmdkhh@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH] fs/ecryptfs/inode.c warnings

Warnings popped up in fs/ecryptfs/inode.c with 2.6.39-rc6

fs/ecryptfs/inode.c: In function 'ecryptfs_do_create':
fs/ecryptfs/inode.c:72: warning: 'dentry_save' may be used
uninitialized in this function
fs/ecryptfs/inode.c:72: note: 'dentry_save' was declared here
fs/ecryptfs/inode.c:73: warning: 'vfsmount_save' may be used
uninitialized in this function
fs/ecryptfs/inode.c:73: note: 'vfsmount_save' was declared here
fs/ecryptfs/inode.c:74: warning: 'flags_save' may be used
uninitialized in this function
fs/ecryptfs/inode.c:74: note: 'flags_save' was declared here

patch sets rc to error and removes the need for two if statements.

-Connor

--- a/fs/ecryptfs/inode.c       2011-05-03 23:28:26.000000000 +0000
+++ b/fs/ecryptfs/inode.c       2011-05-08 22:10:43.000000000 +0000
@@ -69,21 +69,18 @@
 {
       struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
       struct vfsmount *lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
-       struct dentry *dentry_save;
-       struct vfsmount *vfsmount_save;
-       unsigned int flags_save;
-       int rc;
+       int rc = -EIO;

       if (nd) {
-               dentry_save = nd->path.dentry;
-               vfsmount_save = nd->path.mnt;
-               flags_save = nd->flags;
+               struct dentry *dentry_save = nd->path.dentry;
+               struct vfsmount *vfsmount_save = nd->path.mnt;
+               unsigned int flags_save = nd->flags;
               nd->path.dentry = lower_dentry;
               nd->path.mnt = lower_mnt;
               nd->flags &= ~LOOKUP_OPEN;
-       }
-       rc = vfs_create(lower_dir_inode, lower_dentry, mode, nd);
-       if (nd) {
+
+               rc = vfs_create(lower_dir_inode, lower_dentry, mode, nd);
+
               nd->path.dentry = dentry_save;
               nd->path.mnt = vfsmount_save;
               nd->flags = flags_save;
--
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