[ext4:dev 13/13] fs/ext4/namei.c:4034:10: warning: 'ctx' may be used uninitialized in this function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
head:   374431bae2968d2859b49e1f3f9f0d00fa0beb95
commit: 374431bae2968d2859b49e1f3f9f0d00fa0beb95 [13/13] ext4 crypto: add ioctls to allow backup of encryption metadata
config: i386-randconfig-x004-201552 (attached as .config)
reproduce:
        git checkout 374431bae2968d2859b49e1f3f9f0d00fa0beb95
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   fs/ext4/namei.c: In function 'ext4_set_encrypted_filename':
>> fs/ext4/namei.c:4034:10: warning: 'ctx' may be used uninitialized in this function [-Wmaybe-uninitialized]
      retval = ext4_xattr_set_handle(handle, inode,
             ^

vim +/ctx +4034 fs/ext4/namei.c

  4018		retry:
  4019			inode = ext4_new_inode_start_handle_flags(dir, mode, NULL, 0,
  4020						NULL, EXT4_HT_DIR, credits,
  4021						EXT4_NEW_INODE_NOENCRYPT);
  4022			handle = ext4_journal_current_handle();
  4023			if (IS_ERR(inode)) {
  4024				retval = PTR_ERR(inode);
  4025				inode = NULL;
  4026				goto out;
  4027			}
  4028			inode->i_op = &ext4_dir_inode_operations;
  4029			inode->i_fop = &ext4_dir_operations;
  4030			retval = ext4_init_new_dir(handle, dir, inode);
  4031			if (retval)
  4032				goto out;
  4033	
> 4034			retval = ext4_xattr_set_handle(handle, inode,
  4035					EXT4_XATTR_INDEX_ENCRYPTION,
  4036					EXT4_XATTR_NAME_ENCRYPTION_CONTEXT, ctx,
  4037					sizeof(struct ext4_encryption_context),
  4038					fd.file ? XATTR_REPLACE : XATTR_CREATE);
  4039			if (retval)
  4040				goto out;
  4041			ext4_set_inode_flag(inode, EXT4_INODE_ENCRYPT);
  4042			ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux