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]
Message-ID: <202008070314.tI3L82WW%lkp@intel.com>
Date:   Fri, 7 Aug 2020 03:27:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     Theodore Ts'o <tytso@....edu>
Cc:     kbuild-all@...ts.01.org, linux-ext4@...r.kernel.org,
        Andreas Dilger <adilger@...ger.ca>
Subject: [ext4:dev 19/21] fs/ext4/super.c:3515:20: warning: variable
 'lr_mode' set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
head:   fe1edafb90b34392aa1f6d8041faa4e404bb250c
commit: 339c1e22f19275ae6d434cdbbe0bce87fdba79c7 [19/21] ext4: add prefetch_block_bitmaps mount options
config: m68k-randconfig-r032-20200805 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 339c1e22f19275ae6d434cdbbe0bce87fdba79c7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   fs/ext4/super.c: In function 'ext4_register_li_request':
>> fs/ext4/super.c:3515:20: warning: variable 'lr_mode' set but not used [-Wunused-but-set-variable]
    3515 |  enum ext4_li_mode lr_mode = EXT4_LI_MODE_ITABLE;
         |                    ^~~~~~~
   fs/ext4/super.c: In function 'ext4_remount':
   fs/ext4/super.c:5510:6: warning: variable 'enable_quota' set but not used [-Wunused-but-set-variable]
    5510 |  int enable_quota = 0;
         |      ^~~~~~~~~~~~

vim +/lr_mode +3515 fs/ext4/super.c

  3508	
  3509	int ext4_register_li_request(struct super_block *sb,
  3510				     ext4_group_t first_not_zeroed)
  3511	{
  3512		struct ext4_sb_info *sbi = EXT4_SB(sb);
  3513		struct ext4_li_request *elr = NULL;
  3514		ext4_group_t ngroups = sbi->s_groups_count;
> 3515		enum ext4_li_mode lr_mode = EXT4_LI_MODE_ITABLE;
  3516		int ret = 0;
  3517	
  3518		mutex_lock(&ext4_li_mtx);
  3519		if (sbi->s_li_request != NULL) {
  3520			/*
  3521			 * Reset timeout so it can be computed again, because
  3522			 * s_li_wait_mult might have changed.
  3523			 */
  3524			sbi->s_li_request->lr_timeout = 0;
  3525			goto out;
  3526		}
  3527	
  3528		if (test_opt(sb, PREFETCH_BLOCK_BITMAPS)) {
  3529			lr_mode = EXT4_LI_MODE_PREFETCH_BBITMAP;
  3530		} else if (first_not_zeroed == ngroups || sb_rdonly(sb) ||
  3531			   !test_opt(sb, INIT_INODE_TABLE))
  3532			goto out;
  3533	
  3534		elr = ext4_li_request_new(sb, first_not_zeroed);
  3535		if (!elr) {
  3536			ret = -ENOMEM;
  3537			goto out;
  3538		}
  3539	
  3540		if (NULL == ext4_li_info) {
  3541			ret = ext4_li_info_new();
  3542			if (ret)
  3543				goto out;
  3544		}
  3545	
  3546		mutex_lock(&ext4_li_info->li_list_mtx);
  3547		list_add(&elr->lr_request, &ext4_li_info->li_request_list);
  3548		mutex_unlock(&ext4_li_info->li_list_mtx);
  3549	
  3550		sbi->s_li_request = elr;
  3551		/*
  3552		 * set elr to NULL here since it has been inserted to
  3553		 * the request_list and the removal and free of it is
  3554		 * handled by ext4_clear_request_list from now on.
  3555		 */
  3556		elr = NULL;
  3557	
  3558		if (!(ext4_li_info->li_state & EXT4_LAZYINIT_RUNNING)) {
  3559			ret = ext4_run_lazyinit_thread();
  3560			if (ret)
  3561				goto out;
  3562		}
  3563	out:
  3564		mutex_unlock(&ext4_li_mtx);
  3565		if (ret)
  3566			kfree(elr);
  3567		return ret;
  3568	}
  3569	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (17778 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ