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:   Thu, 4 Aug 2022 13:24:45 +0800
From:   kernel test robot <lkp@...el.com>
To:     Nikolay Borisov <nborisov@...e.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, David Sterba <dsterba@...e.com>
Subject: fs/btrfs/ioctl.c:4370: warning: expecting prototype for Try to
 acquire fs_info:(). Prototype was for btrfs_try_lock_balance() instead

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b44f2fd87919b5ae6e1756d4c7ba2cbba22238e1
commit: 7fb10ed89e95e26f5f81087a75f2a4bfa43b1705 btrfs: introduce btrfs_try_lock_balance
date:   10 days ago
config: hexagon-randconfig-r012-20220804
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 26dd42705c2af0b8f6e5d6cdb32c9bd5ed9524eb)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7fb10ed89e95e26f5f81087a75f2a4bfa43b1705
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 7fb10ed89e95e26f5f81087a75f2a4bfa43b1705
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/btrfs/

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

All warnings (new ones prefixed by >>):

>> fs/btrfs/ioctl.c:4370: warning: expecting prototype for Try to acquire fs_info:(). Prototype was for btrfs_try_lock_balance() instead


vim +4370 fs/btrfs/ioctl.c

  4357	
  4358	/**
  4359	 * Try to acquire fs_info::balance_mutex as well as set BTRFS_EXLCOP_BALANCE as
  4360	 * required.
  4361	 *
  4362	 * @fs_info:       the filesystem
  4363	 * @excl_acquired: ptr to boolean value which is set to false in case balance
  4364	 *                 is being resumed
  4365	 *
  4366	 * Return 0 on success in which case both fs_info::balance is acquired as well
  4367	 * as exclusive ops are blocked. In case of failure return an error code.
  4368	 */
  4369	static int btrfs_try_lock_balance(struct btrfs_fs_info *fs_info, bool *excl_acquired)
> 4370	{
  4371		int ret;
  4372	
  4373		/*
  4374		 * Exclusive operation is locked. Three possibilities:
  4375		 *   (1) some other op is running
  4376		 *   (2) balance is running
  4377		 *   (3) balance is paused -- special case (think resume)
  4378		 */
  4379		while (1) {
  4380			if (btrfs_exclop_start(fs_info, BTRFS_EXCLOP_BALANCE)) {
  4381				*excl_acquired = true;
  4382				mutex_lock(&fs_info->balance_mutex);
  4383				return 0;
  4384			}
  4385	
  4386			mutex_lock(&fs_info->balance_mutex);
  4387			if (fs_info->balance_ctl) {
  4388				/* This is either (2) or (3) */
  4389				if (test_bit(BTRFS_FS_BALANCE_RUNNING, &fs_info->flags)) {
  4390					/* This is (2) */
  4391					ret = -EINPROGRESS;
  4392					goto out_failure;
  4393	
  4394				} else {
  4395					mutex_unlock(&fs_info->balance_mutex);
  4396					/*
  4397					 * Lock released to allow other waiters to
  4398					 * continue, we'll reexamine the status again.
  4399					 */
  4400					mutex_lock(&fs_info->balance_mutex);
  4401	
  4402					if (fs_info->balance_ctl &&
  4403					    !test_bit(BTRFS_FS_BALANCE_RUNNING, &fs_info->flags)) {
  4404						/* This is (3) */
  4405						*excl_acquired = false;
  4406						return 0;
  4407					}
  4408				}
  4409			} else {
  4410				/* This is (1) */
  4411				ret = BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS;
  4412				goto out_failure;
  4413			}
  4414	
  4415			mutex_unlock(&fs_info->balance_mutex);
  4416		}
  4417	
  4418	out_failure:
  4419		mutex_unlock(&fs_info->balance_mutex);
  4420		*excl_acquired = false;
  4421		return ret;
  4422	}
  4423	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (120878 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ