CC: [email protected] CC: [email protected] TO: Johannes Thumshirn <[email protected]> CC: Jens Axboe <[email protected]> CC: Christoph Hellwig <[email protected]> CC: "Martin K. Petersen" <[email protected]> CC: Hannes Reinecke <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 3b9cdafb5358eb9f3790de2f728f765fef100731 commit: 5795eb443060148796beeba106e4366d7f1458a6 scsi: sd_zbc: emulate ZONE_APPEND commands date: 10 months ago :::::: branch date: 9 hours ago :::::: commit date: 10 months ago config: microblaze-randconfig-m031-20210223 (attached as .config) compiler: microblaze-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> smatch warnings: drivers/scsi/sd_zbc.c:674 sd_zbc_revalidate_zones() error: kvmalloc() only makes sense with GFP_KERNEL vim +674 drivers/scsi/sd_zbc.c 5795eb44306014 Johannes Thumshirn 2020-05-12 643 5795eb44306014 Johannes Thumshirn 2020-05-12 644 static int sd_zbc_revalidate_zones(struct scsi_disk *sdkp, 5795eb44306014 Johannes Thumshirn 2020-05-12 645 u32 zone_blocks, 5795eb44306014 Johannes Thumshirn 2020-05-12 646 unsigned int nr_zones) 5795eb44306014 Johannes Thumshirn 2020-05-12 647 { 5795eb44306014 Johannes Thumshirn 2020-05-12 648 struct gendisk *disk = sdkp->disk; 5795eb44306014 Johannes Thumshirn 2020-05-12 649 int ret = 0; 5795eb44306014 Johannes Thumshirn 2020-05-12 650 5795eb44306014 Johannes Thumshirn 2020-05-12 651 /* 5795eb44306014 Johannes Thumshirn 2020-05-12 652 * Make sure revalidate zones are serialized to ensure exclusive 5795eb44306014 Johannes Thumshirn 2020-05-12 653 * updates of the scsi disk data. 5795eb44306014 Johannes Thumshirn 2020-05-12 654 */ 5795eb44306014 Johannes Thumshirn 2020-05-12 655 mutex_lock(&sdkp->rev_mutex); 5795eb44306014 Johannes Thumshirn 2020-05-12 656 5795eb44306014 Johannes Thumshirn 2020-05-12 657 /* 5795eb44306014 Johannes Thumshirn 2020-05-12 658 * Revalidate the disk zones to update the device request queue zone 5795eb44306014 Johannes Thumshirn 2020-05-12 659 * bitmaps and the zone write pointer offset array. Do this only once 5795eb44306014 Johannes Thumshirn 2020-05-12 660 * the device capacity is set on the second revalidate execution for 5795eb44306014 Johannes Thumshirn 2020-05-12 661 * disk scan or if something changed when executing a normal revalidate. 5795eb44306014 Johannes Thumshirn 2020-05-12 662 */ 5795eb44306014 Johannes Thumshirn 2020-05-12 663 if (sdkp->first_scan) { 5795eb44306014 Johannes Thumshirn 2020-05-12 664 sdkp->zone_blocks = zone_blocks; 5795eb44306014 Johannes Thumshirn 2020-05-12 665 sdkp->nr_zones = nr_zones; 5795eb44306014 Johannes Thumshirn 2020-05-12 666 goto unlock; 5795eb44306014 Johannes Thumshirn 2020-05-12 667 } 5795eb44306014 Johannes Thumshirn 2020-05-12 668 5795eb44306014 Johannes Thumshirn 2020-05-12 669 if (sdkp->zone_blocks == zone_blocks && 5795eb44306014 Johannes Thumshirn 2020-05-12 670 sdkp->nr_zones == nr_zones && 5795eb44306014 Johannes Thumshirn 2020-05-12 671 disk->queue->nr_zones == nr_zones) 5795eb44306014 Johannes Thumshirn 2020-05-12 672 goto unlock; 5795eb44306014 Johannes Thumshirn 2020-05-12 673 5795eb44306014 Johannes Thumshirn 2020-05-12 @674 sdkp->rev_wp_offset = kvcalloc(nr_zones, sizeof(u32), GFP_NOIO); 5795eb44306014 Johannes Thumshirn 2020-05-12 675 if (!sdkp->rev_wp_offset) { 5795eb44306014 Johannes Thumshirn 2020-05-12 676 ret = -ENOMEM; 5795eb44306014 Johannes Thumshirn 2020-05-12 677 goto unlock; 5795eb44306014 Johannes Thumshirn 2020-05-12 678 } 5795eb44306014 Johannes Thumshirn 2020-05-12 679 5795eb44306014 Johannes Thumshirn 2020-05-12 680 ret = blk_revalidate_disk_zones(disk, sd_zbc_revalidate_zones_cb); 5795eb44306014 Johannes Thumshirn 2020-05-12 681 5795eb44306014 Johannes Thumshirn 2020-05-12 682 kvfree(sdkp->rev_wp_offset); 5795eb44306014 Johannes Thumshirn 2020-05-12 683 sdkp->rev_wp_offset = NULL; 5795eb44306014 Johannes Thumshirn 2020-05-12 684 5795eb44306014 Johannes Thumshirn 2020-05-12 685 unlock: 5795eb44306014 Johannes Thumshirn 2020-05-12 686 mutex_unlock(&sdkp->rev_mutex); 5795eb44306014 Johannes Thumshirn 2020-05-12 687 5795eb44306014 Johannes Thumshirn 2020-05-12 688 return ret; 5795eb44306014 Johannes Thumshirn 2020-05-12 689 } 5795eb44306014 Johannes Thumshirn 2020-05-12 690 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
