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  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:   Fri, 23 Jul 2021 07:41:49 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christoph Hellwig <hch@....de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [hch-block:scsi-ioctl 14/24] drivers/scsi/scsi_sysfs.c:1369:
 undefined reference to `bsg_scsi_register_queue'

tree:   git://git.infradead.org/users/hch/block.git scsi-ioctl
head:   0d6e95412bd07b6406be6d368ea60513807caf83
commit: 075e28806125ae286114e55557067e340f30a93a [14/24] bsg: move bsg_scsi_ops to drivers/scsi/
config: i386-randconfig-s001-20210722 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        git remote add hch-block git://git.infradead.org/users/hch/block.git
        git fetch --no-tags hch-block scsi-ioctl
        git checkout 075e28806125ae286114e55557067e340f30a93a
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash

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

   ld: drivers/scsi/scsi_sysfs.o: in function `scsi_sysfs_add_sdev':
>> drivers/scsi/scsi_sysfs.c:1369: undefined reference to `bsg_scsi_register_queue'


sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/scsi_bsg.c:92:5: sparse: sparse: symbol 'scsi_bsg_register_queue' was not declared. Should it be static?

vim +1369 drivers/scsi/scsi_sysfs.c

643eb2d932c97a0 James Bottomley    2008-03-22  1319  
^1da177e4c3f415 Linus Torvalds     2005-04-16  1320  /**
^1da177e4c3f415 Linus Torvalds     2005-04-16  1321   * scsi_sysfs_add_sdev - add scsi device to sysfs
^1da177e4c3f415 Linus Torvalds     2005-04-16  1322   * @sdev:	scsi_device to add
^1da177e4c3f415 Linus Torvalds     2005-04-16  1323   *
^1da177e4c3f415 Linus Torvalds     2005-04-16  1324   * Return value:
^1da177e4c3f415 Linus Torvalds     2005-04-16  1325   * 	0 on Success / non-zero on Failure
^1da177e4c3f415 Linus Torvalds     2005-04-16  1326   **/
^1da177e4c3f415 Linus Torvalds     2005-04-16  1327  int scsi_sysfs_add_sdev(struct scsi_device *sdev)
^1da177e4c3f415 Linus Torvalds     2005-04-16  1328  {
^1da177e4c3f415 Linus Torvalds     2005-04-16  1329  	int error, i;
80ed71ce1a33695 James Bottomley    2007-07-19  1330  	struct request_queue *rq = sdev->request_queue;
643eb2d932c97a0 James Bottomley    2008-03-22  1331  	struct scsi_target *starget = sdev->sdev_target;
^1da177e4c3f415 Linus Torvalds     2005-04-16  1332  
643eb2d932c97a0 James Bottomley    2008-03-22  1333  	error = scsi_target_add(starget);
643eb2d932c97a0 James Bottomley    2008-03-22  1334  	if (error)
643eb2d932c97a0 James Bottomley    2008-03-22  1335  		return error;
643eb2d932c97a0 James Bottomley    2008-03-22  1336  
643eb2d932c97a0 James Bottomley    2008-03-22  1337  	transport_configure_device(&starget->dev);
bc4f24014de58f0 Alan Stern         2010-06-17  1338  
4cb077d93a57fb8 Rafael J. Wysocki  2010-02-08  1339  	device_enable_async_suspend(&sdev->sdev_gendev);
bc4f24014de58f0 Alan Stern         2010-06-17  1340  	scsi_autopm_get_target(starget);
bc4f24014de58f0 Alan Stern         2010-06-17  1341  	pm_runtime_set_active(&sdev->sdev_gendev);
c74f8056621738f Stanley Chu        2019-09-16  1342  	if (!sdev->rpm_autosuspend)
bc4f24014de58f0 Alan Stern         2010-06-17  1343  		pm_runtime_forbid(&sdev->sdev_gendev);
bc4f24014de58f0 Alan Stern         2010-06-17  1344  	pm_runtime_enable(&sdev->sdev_gendev);
bc4f24014de58f0 Alan Stern         2010-06-17  1345  	scsi_autopm_put_target(starget);
bc4f24014de58f0 Alan Stern         2010-06-17  1346  
bc4f24014de58f0 Alan Stern         2010-06-17  1347  	scsi_autopm_get_device(sdev);
bc4f24014de58f0 Alan Stern         2010-06-17  1348  
2930f8171329592 Hannes Reinecke    2017-09-20  1349  	scsi_dh_add_device(sdev);
086b91d052ebe4e Christoph Hellwig  2015-08-27  1350  
4cd2459c066d297 Hannes Reinecke    2016-03-03  1351  	error = device_add(&sdev->sdev_gendev);
4cd2459c066d297 Hannes Reinecke    2016-03-03  1352  	if (error) {
4cd2459c066d297 Hannes Reinecke    2016-03-03  1353  		sdev_printk(KERN_INFO, sdev,
4cd2459c066d297 Hannes Reinecke    2016-03-03  1354  				"failed to add device: %d\n", error);
4cd2459c066d297 Hannes Reinecke    2016-03-03  1355  		return error;
4cd2459c066d297 Hannes Reinecke    2016-03-03  1356  	}
4cd2459c066d297 Hannes Reinecke    2016-03-03  1357  
4cb077d93a57fb8 Rafael J. Wysocki  2010-02-08  1358  	device_enable_async_suspend(&sdev->sdev_dev);
ee959b00c335d77 Tony Jones         2008-02-22  1359  	error = device_add(&sdev->sdev_dev);
^1da177e4c3f415 Linus Torvalds     2005-04-16  1360  	if (error) {
73d8c34f3d78ccf Alan Stern         2010-11-15  1361  		sdev_printk(KERN_INFO, sdev,
73d8c34f3d78ccf Alan Stern         2010-11-15  1362  				"failed to add class device: %d\n", error);
860dc73608a091e James Bottomley    2009-11-19  1363  		device_del(&sdev->sdev_gendev);
ee37e09d81a4acf Alan Stern         2010-02-12  1364  		return error;
^1da177e4c3f415 Linus Torvalds     2005-04-16  1365  	}
860dc73608a091e James Bottomley    2009-11-19  1366  	transport_add_device(&sdev->sdev_gendev);
860dc73608a091e James Bottomley    2009-11-19  1367  	sdev->is_visible = 1;
^1da177e4c3f415 Linus Torvalds     2005-04-16  1368  
17cb960f29c29ee Christoph Hellwig  2018-03-13 @1369  	error = bsg_scsi_register_queue(rq, &sdev->sdev_gendev);
80ed71ce1a33695 James Bottomley    2007-07-19  1370  	if (error)
860dc73608a091e James Bottomley    2009-11-19  1371  		/* we're treating error on bsg register as non-fatal,
860dc73608a091e James Bottomley    2009-11-19  1372  		 * so pretend nothing went wrong */
80ed71ce1a33695 James Bottomley    2007-07-19  1373  		sdev_printk(KERN_INFO, sdev,
80ed71ce1a33695 James Bottomley    2007-07-19  1374  			    "Failed to register bsg queue, errno=%d\n", error);
80ed71ce1a33695 James Bottomley    2007-07-19  1375  
bfd129445f23c03 Kay Sievers        2007-09-11  1376  	/* add additional host specific attributes */
^1da177e4c3f415 Linus Torvalds     2005-04-16  1377  	if (sdev->host->hostt->sdev_attrs) {
^1da177e4c3f415 Linus Torvalds     2005-04-16  1378  		for (i = 0; sdev->host->hostt->sdev_attrs[i]; i++) {
bfd129445f23c03 Kay Sievers        2007-09-11  1379  			error = device_create_file(&sdev->sdev_gendev,
^1da177e4c3f415 Linus Torvalds     2005-04-16  1380  					sdev->host->hostt->sdev_attrs[i]);
860dc73608a091e James Bottomley    2009-11-19  1381  			if (error)
ee37e09d81a4acf Alan Stern         2010-02-12  1382  				return error;
^1da177e4c3f415 Linus Torvalds     2005-04-16  1383  		}
^1da177e4c3f415 Linus Torvalds     2005-04-16  1384  	}
^1da177e4c3f415 Linus Torvalds     2005-04-16  1385  
86b87cde0b5581c Stanislav Nijnikov 2018-02-15  1386  	if (sdev->host->hostt->sdev_groups) {
86b87cde0b5581c Stanislav Nijnikov 2018-02-15  1387  		error = sysfs_create_groups(&sdev->sdev_gendev.kobj,
86b87cde0b5581c Stanislav Nijnikov 2018-02-15  1388  				sdev->host->hostt->sdev_groups);
86b87cde0b5581c Stanislav Nijnikov 2018-02-15  1389  		if (error)
86b87cde0b5581c Stanislav Nijnikov 2018-02-15  1390  			return error;
86b87cde0b5581c Stanislav Nijnikov 2018-02-15  1391  	}
86b87cde0b5581c Stanislav Nijnikov 2018-02-15  1392  
6fe8c1dbefd63ef Subhash Jadavani   2014-09-10  1393  	scsi_autopm_put_device(sdev);
^1da177e4c3f415 Linus Torvalds     2005-04-16  1394  	return error;
^1da177e4c3f415 Linus Torvalds     2005-04-16  1395  }
^1da177e4c3f415 Linus Torvalds     2005-04-16  1396  

:::::: The code at line 1369 was first introduced by commit
:::::: 17cb960f29c29ee07bf6848ada3265f4be55972e bsg: split handling of SCSI CDBs vs transport requeues

:::::: TO: Christoph Hellwig <hch@....de>
:::::: CC: Jens Axboe <axboe@...nel.dk>

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

Powered by blists - more mailing lists