Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "The one core change is a re-roll of the tag allocation fix from the
  last pull request that uses the correct goto to unroll all the
  allocations. The remianing fixes are all small ones in drivers"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: hisi_sas: Fix NULL pointer exception during user_scan()
  scsi: qla2xxx: Completely fix fcport double free
  scsi: ufs: core: Fix SError in ufshcd_rtc_work() during UFS suspend
  scsi: core: Fix error handling for scsi_alloc_sdev()
This commit is contained in:
Linus Torvalds
2026-03-15 13:15:39 -07:00
5 changed files with 5 additions and 11 deletions

View File

@@ -2578,7 +2578,7 @@ int hisi_sas_probe(struct platform_device *pdev,
shost->transportt = hisi_sas_stt; shost->transportt = hisi_sas_stt;
shost->max_id = HISI_SAS_MAX_DEVICES; shost->max_id = HISI_SAS_MAX_DEVICES;
shost->max_lun = ~0; shost->max_lun = ~0;
shost->max_channel = 1; shost->max_channel = 0;
shost->max_cmd_len = HISI_SAS_MAX_CDB_LEN; shost->max_cmd_len = HISI_SAS_MAX_CDB_LEN;
if (hisi_hba->hw->slot_index_alloc) { if (hisi_hba->hw->slot_index_alloc) {
shost->can_queue = HISI_SAS_MAX_COMMANDS; shost->can_queue = HISI_SAS_MAX_COMMANDS;

View File

@@ -4993,7 +4993,7 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
shost->transportt = hisi_sas_stt; shost->transportt = hisi_sas_stt;
shost->max_id = HISI_SAS_MAX_DEVICES; shost->max_id = HISI_SAS_MAX_DEVICES;
shost->max_lun = ~0; shost->max_lun = ~0;
shost->max_channel = 1; shost->max_channel = 0;
shost->max_cmd_len = HISI_SAS_MAX_CDB_LEN; shost->max_cmd_len = HISI_SAS_MAX_CDB_LEN;
shost->can_queue = HISI_SAS_UNRESERVED_IPTT; shost->can_queue = HISI_SAS_UNRESERVED_IPTT;
shost->cmd_per_lun = HISI_SAS_UNRESERVED_IPTT; shost->cmd_per_lun = HISI_SAS_UNRESERVED_IPTT;

View File

@@ -2751,7 +2751,6 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *vha, int els_opcode,
if (!elsio->u.els_logo.els_logo_pyld) { if (!elsio->u.els_logo.els_logo_pyld) {
/* ref: INIT */ /* ref: INIT */
kref_put(&sp->cmd_kref, qla2x00_sp_release); kref_put(&sp->cmd_kref, qla2x00_sp_release);
qla2x00_free_fcport(fcport);
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
} }
@@ -2776,7 +2775,6 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *vha, int els_opcode,
if (rval != QLA_SUCCESS) { if (rval != QLA_SUCCESS) {
/* ref: INIT */ /* ref: INIT */
kref_put(&sp->cmd_kref, qla2x00_sp_release); kref_put(&sp->cmd_kref, qla2x00_sp_release);
qla2x00_free_fcport(fcport);
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
} }

View File

@@ -360,12 +360,8 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
* default device queue depth to figure out sbitmap shift * default device queue depth to figure out sbitmap shift
* since we use this queue depth most of times. * since we use this queue depth most of times.
*/ */
if (scsi_realloc_sdev_budget_map(sdev, depth)) { if (scsi_realloc_sdev_budget_map(sdev, depth))
kref_put(&sdev->host->tagset_refcnt, scsi_mq_free_tags); goto out_device_destroy;
put_device(&starget->dev);
kfree(sdev);
goto out;
}
scsi_change_queue_depth(sdev, depth); scsi_change_queue_depth(sdev, depth);

View File

@@ -10066,6 +10066,7 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
} }
flush_work(&hba->eeh_work); flush_work(&hba->eeh_work);
cancel_delayed_work_sync(&hba->ufs_rtc_update_work);
ret = ufshcd_vops_suspend(hba, pm_op, PRE_CHANGE); ret = ufshcd_vops_suspend(hba, pm_op, PRE_CHANGE);
if (ret) if (ret)
@@ -10120,7 +10121,6 @@ vops_suspend:
if (ret) if (ret)
goto set_link_active; goto set_link_active;
cancel_delayed_work_sync(&hba->ufs_rtc_update_work);
goto out; goto out;
set_link_active: set_link_active: