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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202109101955.RVnEqzGf-lkp@intel.com>
Date:   Fri, 10 Sep 2021 19:45:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Xu Wang <vulab@...as.ac.cn>, axboe@...nel.dk
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] blk-zoned: Remove needless request_queue NULL pointer
 checks

Hi Xu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on v5.14 next-20210910]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Xu-Wang/blk-zoned-Remove-needless-request_queue-NULL-pointer-checks/20210910-144721
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: hexagon-randconfig-r045-20210910 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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://github.com/0day-ci/linux/commit/bc1beb73948b721209a36db7693ed7a621037757
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xu-Wang/blk-zoned-Remove-needless-request_queue-NULL-pointer-checks/20210910-144721
        git checkout bc1beb73948b721209a36db7693ed7a621037757
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon 

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

All errors (new ones prefixed by >>):

>> block/blk-zoned.c:349:28: error: implicit declaration of function 'dev_get_queue' [-Werror,-Wimplicit-function-declaration]
           struct request_queue *q = dev_get_queue(bdev);
                                     ^
   block/blk-zoned.c:349:28: note: did you mean 'bdev_get_queue'?
   include/linux/blkdev.h:897:37: note: 'bdev_get_queue' declared here
   static inline struct request_queue *bdev_get_queue(struct block_device *bdev)
                                       ^
>> block/blk-zoned.c:349:24: error: incompatible integer to pointer conversion initializing 'struct request_queue *' with an expression of type 'int' [-Werror,-Wint-conversion]
           struct request_queue *q = dev_get_queue(bdev);
                                 ^   ~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/dev_get_queue +349 block/blk-zoned.c

   339	
   340	/*
   341	 * BLKREPORTZONE ioctl processing.
   342	 * Called from blkdev_ioctl.
   343	 */
   344	int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode,
   345				      unsigned int cmd, unsigned long arg)
   346	{
   347		void __user *argp = (void __user *)arg;
   348		struct zone_report_args args;
 > 349		struct request_queue *q = dev_get_queue(bdev);
   350		struct blk_zone_report rep;
   351		int ret;
   352	
   353		if (!argp)
   354			return -EINVAL;
   355	
   356		if (!blk_queue_is_zoned(q))
   357			return -ENOTTY;
   358	
   359		if (copy_from_user(&rep, argp, sizeof(struct blk_zone_report)))
   360			return -EFAULT;
   361	
   362		if (!rep.nr_zones)
   363			return -EINVAL;
   364	
   365		args.zones = argp + sizeof(struct blk_zone_report);
   366		ret = blkdev_report_zones(bdev, rep.sector, rep.nr_zones,
   367					  blkdev_copy_zone_to_user, &args);
   368		if (ret < 0)
   369			return ret;
   370	
   371		rep.nr_zones = ret;
   372		rep.flags = BLK_ZONE_REP_CAPACITY;
   373		if (copy_to_user(argp, &rep, sizeof(struct blk_zone_report)))
   374			return -EFAULT;
   375		return 0;
   376	}
   377	

---
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" (26307 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ