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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202512061547.zszMg0HR-lkp@intel.com>
Date: Sat, 6 Dec 2025 15:39:59 +0800
From: kernel test robot <lkp@...el.com>
To: Chaohai Chen <wdhh6@...yun.com>, john.g.garry@...cle.com,
	yanaijie@...wei.com, James.Bottomley@...senpartnership.com,
	martin.petersen@...cle.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, dlemoal@...nel.org,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: libsas: Add error handling in the
 sas_register_phys()

Hi Chaohai,

kernel test robot noticed the following build errors:

[auto build test ERROR on jejb-scsi/for-next]
[also build test ERROR on mkp-scsi/for-next linus/master v6.18 next-20251205]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Chaohai-Chen/scsi-libsas-Add-error-handling-in-the-sas_register_phys/20251205-174712
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link:    https://lore.kernel.org/r/20251205080252.1020028-1-wdhh6%40aliyun.com
patch subject: [PATCH] scsi: libsas: Add error handling in the sas_register_phys()
config: hexagon-randconfig-001-20251206 (https://download.01.org/0day-ci/archive/20251206/202512061547.zszMg0HR-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512061547.zszMg0HR-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512061547.zszMg0HR-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/scsi/libsas/sas_phy.c:165:16: error: incompatible pointer types passing 'struct asd_sas_phy *' to parameter of type 'struct sas_phy *' [-Werror,-Wincompatible-pointer-types]
                   sas_phy_free(phy);
                                ^~~
   include/scsi/scsi_transport_sas.h:192:42: note: passing argument to parameter here
   extern void sas_phy_free(struct sas_phy *);
                                            ^
   1 error generated.


vim +165 drivers/scsi/libsas/sas_phy.c

   115	
   116	int sas_register_phys(struct sas_ha_struct *sas_ha)
   117	{
   118		int i;
   119		int ret = 0;
   120	
   121		/* Now register the phys. */
   122		for (i = 0; i < sas_ha->num_phys; i++) {
   123			struct asd_sas_phy *phy = sas_ha->sas_phy[i];
   124	
   125			phy->error = 0;
   126			atomic_set(&phy->event_nr, 0);
   127			INIT_LIST_HEAD(&phy->port_phy_el);
   128	
   129			phy->port = NULL;
   130			phy->ha = sas_ha;
   131			spin_lock_init(&phy->frame_rcvd_lock);
   132			spin_lock_init(&phy->sas_prim_lock);
   133			phy->frame_rcvd_size = 0;
   134	
   135			phy->phy = sas_phy_alloc(&sas_ha->shost->shost_gendev, i);
   136			if (!phy->phy) {
   137				ret = -ENOMEM;
   138				goto fail;
   139			}
   140	
   141			phy->phy->identify.initiator_port_protocols =
   142				phy->iproto;
   143			phy->phy->identify.target_port_protocols = phy->tproto;
   144			phy->phy->identify.sas_address = SAS_ADDR(sas_ha->sas_addr);
   145			phy->phy->identify.phy_identifier = i;
   146			phy->phy->minimum_linkrate_hw = SAS_LINK_RATE_UNKNOWN;
   147			phy->phy->maximum_linkrate_hw = SAS_LINK_RATE_UNKNOWN;
   148			phy->phy->minimum_linkrate = SAS_LINK_RATE_UNKNOWN;
   149			phy->phy->maximum_linkrate = SAS_LINK_RATE_UNKNOWN;
   150			phy->phy->negotiated_linkrate = SAS_LINK_RATE_UNKNOWN;
   151	
   152			ret = sas_phy_add(phy->phy);
   153			if (ret) {
   154				sas_phy_free(phy->phy);
   155				goto fail;
   156			}
   157		}
   158	
   159		return 0;
   160	fail:
   161		for (i--; i >= 0; i--) {
   162			struct asd_sas_phy *phy = sas_ha->sas_phy[i];
   163	
   164			sas_phy_delete(phy->phy);
 > 165			sas_phy_free(phy);
   166		}
   167		return ret;
   168	}
   169	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ