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: <202107152018.LikTov1f-lkp@intel.com>
Date:   Thu, 15 Jul 2021 20:22:23 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luis Chamberlain <mcgrof@...nel.org>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mcgrof-next:20210708-block-fixes-v2 65/89]
 drivers/memstick/core/ms_block.c:2166:19: error: incompatible pointer types
 passing 'struct request_queue *' to parameter of type 'struct gendisk *'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210708-block-fixes-v2
head:   db0174e39de7dc941f158ce53ee3af95b1635b62
commit: 521765ac9bd8d3911b79b1c7a232d35391cc64af [65/89] ms_block: add error handling support for add_disk()
config: arm64-randconfig-r036-20210715 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0e49c54a8cbd3e779e5526a5888c683c01cc3c50)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/commit/?id=521765ac9bd8d3911b79b1c7a232d35391cc64af
        git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
        git fetch --no-tags mcgrof-next 20210708-block-fixes-v2
        git checkout 521765ac9bd8d3911b79b1c7a232d35391cc64af
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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 >>):

>> drivers/memstick/core/ms_block.c:2166:19: error: incompatible pointer types passing 'struct request_queue *' to parameter of type 'struct gendisk *' [-Werror,-Wincompatible-pointer-types]
           blk_cleanup_disk(msb->queue);
                            ^~~~~~~~~~
   include/linux/genhd.h:312:39: note: passing argument to parameter 'disk' here
   void blk_cleanup_disk(struct gendisk *disk);
                                         ^
   1 error generated.


vim +2166 drivers/memstick/core/ms_block.c

  2108	
  2109	/* Registers the block device */
  2110	static int msb_init_disk(struct memstick_dev *card)
  2111	{
  2112		struct msb_data *msb = memstick_get_drvdata(card);
  2113		int rc;
  2114		unsigned long capacity;
  2115	
  2116		mutex_lock(&msb_disk_lock);
  2117		msb->disk_id = idr_alloc(&msb_disk_idr, card, 0, 256, GFP_KERNEL);
  2118		mutex_unlock(&msb_disk_lock);
  2119	
  2120		if (msb->disk_id  < 0)
  2121			return msb->disk_id;
  2122	
  2123		rc = blk_mq_alloc_sq_tag_set(&msb->tag_set, &msb_mq_ops, 2,
  2124					     BLK_MQ_F_SHOULD_MERGE);
  2125		if (rc)
  2126			goto out_release_id;
  2127	
  2128		msb->disk = blk_mq_alloc_disk(&msb->tag_set, card);
  2129		if (IS_ERR(msb->disk)) {
  2130			rc = PTR_ERR(msb->disk);
  2131			goto out_free_tag_set;
  2132		}
  2133		msb->queue = msb->disk->queue;
  2134	
  2135		blk_queue_max_hw_sectors(msb->queue, MS_BLOCK_MAX_PAGES);
  2136		blk_queue_max_segments(msb->queue, MS_BLOCK_MAX_SEGS);
  2137		blk_queue_max_segment_size(msb->queue,
  2138					   MS_BLOCK_MAX_PAGES * msb->page_size);
  2139		blk_queue_logical_block_size(msb->queue, msb->page_size);
  2140	
  2141		sprintf(msb->disk->disk_name, "msblk%d", msb->disk_id);
  2142		msb->disk->fops = &msb_bdops;
  2143		msb->disk->private_data = msb;
  2144	
  2145		capacity = msb->pages_in_block * msb->logical_block_count;
  2146		capacity *= (msb->page_size / 512);
  2147		set_capacity(msb->disk, capacity);
  2148		dbg("Set total disk size to %lu sectors", capacity);
  2149	
  2150		msb->usage_count = 1;
  2151		msb->io_queue = alloc_ordered_workqueue("ms_block", WQ_MEM_RECLAIM);
  2152		INIT_WORK(&msb->io_work, msb_io_work);
  2153		sg_init_table(msb->prealloc_sg, MS_BLOCK_MAX_SEGS+1);
  2154	
  2155		if (msb->read_only)
  2156			set_disk_ro(msb->disk, 1);
  2157	
  2158		msb_start(card);
  2159		rc = device_add_disk(&card->dev, msb->disk, NULL);
  2160		if (rc)
  2161			goto out_cleanup_disk;
  2162		dbg("Disk added");
  2163		return 0;
  2164	
  2165	out_cleanup_disk:
> 2166		blk_cleanup_disk(msb->queue);
  2167	out_free_tag_set:
  2168		blk_mq_free_tag_set(&msb->tag_set);
  2169	out_release_id:
  2170		mutex_lock(&msb_disk_lock);
  2171		idr_remove(&msb_disk_idr, msb->disk_id);
  2172		mutex_unlock(&msb_disk_lock);
  2173		return rc;
  2174	}
  2175	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ