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: <202108210123.YSlewUZg-lkp@intel.com>
Date:   Sat, 21 Aug 2021 01:57:32 +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:20210819-add-disk-error-handling-next 67/90]
 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 20210819-add-disk-error-handling-next
head:   4a644c3aee4465306a79d393956c84ce8925fa6b
commit: 11db06272f02ef4208857a2825c3799afa048f13 [67/90] ms_block: add error handling support for add_disk()
config: x86_64-randconfig-a014-20210820 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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/mcgrof/linux-next.git/commit/?id=11db06272f02ef4208857a2825c3799afa048f13
        git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
        git fetch --no-tags mcgrof-next 20210819-add-disk-error-handling-next
        git checkout 11db06272f02ef4208857a2825c3799afa048f13
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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:281: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" (31863 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ