Re: [PATCH 12/17] target: hook most target users into sysfs API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mike,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next vhost/linux-next xen-tip/linux-next v5.7 next-20200605]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Mike-Christie/target-add-sysfs-support/20200608-044027
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc 

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

Note: the linux-review/Mike-Christie/target-add-sysfs-support/20200608-044027 HEAD fc08cd1eb111346ece0dceae6f01be21509d2c49 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>, old ones prefixed by <<):

drivers/target/target_core_sysfs.c: In function 'target_cp_endpoint_strs':
>> drivers/target/target_core_sysfs.c:172:13: error: 'struct se_session' has no member named 'tfo'
172 |  if (se_sess->tfo->fabric_alias)
|             ^~
drivers/target/target_core_sysfs.c:173:41: error: 'struct se_session' has no member named 'tfo'
173 |   se_sess->fabric_name = kstrdup(se_sess->tfo->fabric_alias,
|                                         ^~
drivers/target/target_core_sysfs.c:176:41: error: 'struct se_session' has no member named 'tfo'
176 |   se_sess->fabric_name = kstrdup(se_sess->tfo->fabric_name,
|                                         ^~
drivers/target/target_core_sysfs.c: In function 'target_sysfs_add_session':
drivers/target/target_core_sysfs.c:206:29: error: 'struct se_session' has no member named 'tfo'
206 |  if (!try_module_get(se_sess->tfo->module))
|                             ^~
drivers/target/target_core_sysfs.c:213:31: error: 'struct se_session' has no member named 'tfo'
213 |  se_sess->dev.groups = se_sess->tfo->session_attr_groups;
|                               ^~
drivers/target/target_core_sysfs.c:233:20: error: 'struct se_session' has no member named 'tfo'
233 |  module_put(se_sess->tfo->module);
|                    ^~

vim +172 drivers/target/target_core_sysfs.c

03975f2939ad69 Mike Christie 2020-06-07  151  
03975f2939ad69 Mike Christie 2020-06-07  152  static int target_cp_endpoint_strs(struct se_portal_group *se_tpg,
03975f2939ad69 Mike Christie 2020-06-07  153  				   struct se_session *se_sess)
03975f2939ad69 Mike Christie 2020-06-07  154  {
03975f2939ad69 Mike Christie 2020-06-07  155  	/*
03975f2939ad69 Mike Christie 2020-06-07  156  	 * Copy configfs dir/object names so userspace can match the session
03975f2939ad69 Mike Christie 2020-06-07  157  	 * to its target, and we also don't have to worry about mixing configfs
03975f2939ad69 Mike Christie 2020-06-07  158  	 * refcounts with sysfs.
03975f2939ad69 Mike Christie 2020-06-07  159  	 */
03975f2939ad69 Mike Christie 2020-06-07  160  	if (!se_sess->se_node_acl->dynamic_node_acl) {
03975f2939ad69 Mike Christie 2020-06-07  161  		se_sess->acl_name = kstrdup(se_sess->se_node_acl->initiatorname,
03975f2939ad69 Mike Christie 2020-06-07  162  					    GFP_KERNEL);
03975f2939ad69 Mike Christie 2020-06-07  163  		if (!se_sess->acl_name)
03975f2939ad69 Mike Christie 2020-06-07  164  			return -ENOMEM;
03975f2939ad69 Mike Christie 2020-06-07  165  	}
03975f2939ad69 Mike Christie 2020-06-07  166  
03975f2939ad69 Mike Christie 2020-06-07  167  	se_sess->target_name = kstrdup(se_tpg->se_tpg_wwn->wwn_group.cg_item.ci_name,
03975f2939ad69 Mike Christie 2020-06-07  168  				       GFP_KERNEL);
03975f2939ad69 Mike Christie 2020-06-07  169  	if (!se_sess->target_name)
03975f2939ad69 Mike Christie 2020-06-07  170  		goto free_acl;
03975f2939ad69 Mike Christie 2020-06-07  171  
03975f2939ad69 Mike Christie 2020-06-07 @172  	if (se_sess->tfo->fabric_alias)
03975f2939ad69 Mike Christie 2020-06-07  173  		se_sess->fabric_name = kstrdup(se_sess->tfo->fabric_alias,
03975f2939ad69 Mike Christie 2020-06-07  174  					       GFP_KERNEL);
03975f2939ad69 Mike Christie 2020-06-07  175  	else
03975f2939ad69 Mike Christie 2020-06-07  176  		se_sess->fabric_name = kstrdup(se_sess->tfo->fabric_name,
03975f2939ad69 Mike Christie 2020-06-07  177  					       GFP_KERNEL);
03975f2939ad69 Mike Christie 2020-06-07  178  	if (!se_sess->fabric_name)
03975f2939ad69 Mike Christie 2020-06-07  179  		goto free_target;
03975f2939ad69 Mike Christie 2020-06-07  180  
03975f2939ad69 Mike Christie 2020-06-07  181  	se_sess->tpg_name = kstrdup(se_tpg->tpg_group.cg_item.ci_name,
03975f2939ad69 Mike Christie 2020-06-07  182  				    GFP_KERNEL);
03975f2939ad69 Mike Christie 2020-06-07  183  	if (!se_sess->tpg_name)
03975f2939ad69 Mike Christie 2020-06-07  184  		goto free_fabric;
03975f2939ad69 Mike Christie 2020-06-07  185  
03975f2939ad69 Mike Christie 2020-06-07  186  	return 0;
03975f2939ad69 Mike Christie 2020-06-07  187  
03975f2939ad69 Mike Christie 2020-06-07  188  free_fabric:
03975f2939ad69 Mike Christie 2020-06-07  189  	kfree(se_sess->fabric_name);
03975f2939ad69 Mike Christie 2020-06-07  190  	se_sess->fabric_name = NULL;
03975f2939ad69 Mike Christie 2020-06-07  191  free_target:
03975f2939ad69 Mike Christie 2020-06-07  192  	kfree(se_sess->target_name);
03975f2939ad69 Mike Christie 2020-06-07  193  	se_sess->target_name = NULL;
03975f2939ad69 Mike Christie 2020-06-07  194  free_acl:
03975f2939ad69 Mike Christie 2020-06-07  195  	kfree(se_sess->acl_name);
03975f2939ad69 Mike Christie 2020-06-07  196  	se_sess->acl_name = NULL;
03975f2939ad69 Mike Christie 2020-06-07  197  	return -ENOMEM;
03975f2939ad69 Mike Christie 2020-06-07  198  }
03975f2939ad69 Mike Christie 2020-06-07  199  

:::::: The code at line 172 was first introduced by commit
:::::: 03975f2939ad69a19b1a7cdd49cb83e66258688e target: add session sysfs class support

:::::: TO: Mike Christie <michael.christie@xxxxxxxxxx>
:::::: CC: 0day robot <lkp@xxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux