Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Pull SCSI fixes from James Bottomley:
"Four mostly error leg fixes and one more important regression in a
prior commit (the qla2xxx one)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: fc: check for rport presence in fc_block_scsi_eh
scsi: qla2xxx: Fix uninitialized work element
scsi: libiscsi: fix shifting of DID_REQUEUE host byte
scsi: libfc: fix a deadlock in fc_rport_work
scsi: fixup kernel warning during rmmod()

+15 -5
+1 -1
drivers/scsi/libfc/fc_rport.c
··· 383 383 fc_rport_enter_flogi(rdata); 384 384 mutex_unlock(&rdata->rp_mutex); 385 385 } else { 386 + mutex_unlock(&rdata->rp_mutex); 386 387 FC_RPORT_DBG(rdata, "work delete\n"); 387 388 mutex_lock(&lport->disc.disc_mutex); 388 389 list_del_rcu(&rdata->peers); 389 390 mutex_unlock(&lport->disc.disc_mutex); 390 - mutex_unlock(&rdata->rp_mutex); 391 391 kref_put(&rdata->kref, fc_rport_destroy); 392 392 } 393 393 } else {
+1 -1
drivers/scsi/libiscsi.c
··· 1728 1728 1729 1729 if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx)) { 1730 1730 reason = FAILURE_SESSION_IN_RECOVERY; 1731 - sc->result = DID_REQUEUE; 1731 + sc->result = DID_REQUEUE << 16; 1732 1732 goto fault; 1733 1733 } 1734 1734
+2 -1
drivers/scsi/qla2xxx/qla_os.c
··· 3175 3175 host->can_queue, base_vha->req, 3176 3176 base_vha->mgmt_svr_loop_id, host->sg_tablesize); 3177 3177 3178 + INIT_WORK(&base_vha->iocb_work, qla2x00_iocb_work_fn); 3179 + 3178 3180 if (ha->mqenable) { 3179 3181 bool mq = false; 3180 3182 bool startit = false; ··· 3225 3223 */ 3226 3224 qla2xxx_wake_dpc(base_vha); 3227 3225 3228 - INIT_WORK(&base_vha->iocb_work, qla2x00_iocb_work_fn); 3229 3226 INIT_WORK(&ha->board_disable, qla2x00_disable_board_on_pci_error); 3230 3227 3231 3228 if (IS_QLA8031(ha) || IS_MCTP_CAPABLE(ha)) {
+8 -2
drivers/scsi/scsi_sysfs.c
··· 1376 1376 spin_lock_irqsave(shost->host_lock, flags); 1377 1377 restart: 1378 1378 list_for_each_entry(sdev, &shost->__devices, siblings) { 1379 + /* 1380 + * We cannot call scsi_device_get() here, as 1381 + * we might've been called from rmmod() causing 1382 + * scsi_device_get() to fail the module_is_live() 1383 + * check. 1384 + */ 1379 1385 if (sdev->channel != starget->channel || 1380 1386 sdev->id != starget->id || 1381 - scsi_device_get(sdev)) 1387 + !get_device(&sdev->sdev_gendev)) 1382 1388 continue; 1383 1389 spin_unlock_irqrestore(shost->host_lock, flags); 1384 1390 scsi_remove_device(sdev); 1385 - scsi_device_put(sdev); 1391 + put_device(&sdev->sdev_gendev); 1386 1392 spin_lock_irqsave(shost->host_lock, flags); 1387 1393 goto restart; 1388 1394 }
+3
drivers/scsi/scsi_transport_fc.c
··· 3320 3320 { 3321 3321 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); 3322 3322 3323 + if (WARN_ON_ONCE(!rport)) 3324 + return FAST_IO_FAIL; 3325 + 3323 3326 return fc_block_rport(rport); 3324 3327 } 3325 3328 EXPORT_SYMBOL(fc_block_scsi_eh);