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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull SCSI fixes from James Bottomley:
"Six fairly small fixes. None is a real show stopper, two automation
detected problems: one memory leak, one use after free and four others
each of which fixes something that has been a significant source of
annoyance to someone"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: zfcp: fix use-after-free by not tracing WKA port open/close on failed send
scsi: aacraid: Fix INTx/MSI-x issue with older controllers
scsi: mpt3sas: disable ASPM for MPI2 controllers
scsi: mpt3sas: Force request partial completion alignment
scsi: qla2xxx: Avoid that issuing a LIP triggers a kernel crash
scsi: qla2xxx: Fix a recently introduced memory leak

+31 -8
+4 -4
drivers/s390/scsi/zfcp_fsf.c
··· 1583 1583 int zfcp_fsf_open_wka_port(struct zfcp_fc_wka_port *wka_port) 1584 1584 { 1585 1585 struct zfcp_qdio *qdio = wka_port->adapter->qdio; 1586 - struct zfcp_fsf_req *req = NULL; 1586 + struct zfcp_fsf_req *req; 1587 1587 int retval = -EIO; 1588 1588 1589 1589 spin_lock_irq(&qdio->req_q_lock); ··· 1612 1612 zfcp_fsf_req_free(req); 1613 1613 out: 1614 1614 spin_unlock_irq(&qdio->req_q_lock); 1615 - if (req && !IS_ERR(req)) 1615 + if (!retval) 1616 1616 zfcp_dbf_rec_run_wka("fsowp_1", wka_port, req->req_id); 1617 1617 return retval; 1618 1618 } ··· 1638 1638 int zfcp_fsf_close_wka_port(struct zfcp_fc_wka_port *wka_port) 1639 1639 { 1640 1640 struct zfcp_qdio *qdio = wka_port->adapter->qdio; 1641 - struct zfcp_fsf_req *req = NULL; 1641 + struct zfcp_fsf_req *req; 1642 1642 int retval = -EIO; 1643 1643 1644 1644 spin_lock_irq(&qdio->req_q_lock); ··· 1667 1667 zfcp_fsf_req_free(req); 1668 1668 out: 1669 1669 spin_unlock_irq(&qdio->req_q_lock); 1670 - if (req && !IS_ERR(req)) 1670 + if (!retval) 1671 1671 zfcp_dbf_rec_run_wka("fscwp_1", wka_port, req->req_id); 1672 1672 return retval; 1673 1673 }
+6 -2
drivers/scsi/aacraid/comminit.c
··· 50 50 51 51 static inline int aac_is_msix_mode(struct aac_dev *dev) 52 52 { 53 - u32 status; 53 + u32 status = 0; 54 54 55 - status = src_readl(dev, MUnit.OMR); 55 + if (dev->pdev->device == PMC_DEVICE_S6 || 56 + dev->pdev->device == PMC_DEVICE_S7 || 57 + dev->pdev->device == PMC_DEVICE_S8) { 58 + status = src_readl(dev, MUnit.OMR); 59 + } 56 60 return (status & AAC_INT_MODE_MSIX); 57 61 } 58 62
+18
drivers/scsi/mpt3sas/mpt3sas_scsih.c
··· 51 51 #include <linux/workqueue.h> 52 52 #include <linux/delay.h> 53 53 #include <linux/pci.h> 54 + #include <linux/pci-aspm.h> 54 55 #include <linux/interrupt.h> 55 56 #include <linux/aer.h> 56 57 #include <linux/raid_class.h> ··· 4658 4657 struct MPT3SAS_DEVICE *sas_device_priv_data; 4659 4658 u32 response_code = 0; 4660 4659 unsigned long flags; 4660 + unsigned int sector_sz; 4661 4661 4662 4662 mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); 4663 4663 scmd = _scsih_scsi_lookup_get_clear(ioc, smid); ··· 4717 4715 } 4718 4716 4719 4717 xfer_cnt = le32_to_cpu(mpi_reply->TransferCount); 4718 + 4719 + /* In case of bogus fw or device, we could end up having 4720 + * unaligned partial completion. We can force alignment here, 4721 + * then scsi-ml does not need to handle this misbehavior. 4722 + */ 4723 + sector_sz = scmd->device->sector_size; 4724 + if (unlikely(scmd->request->cmd_type == REQ_TYPE_FS && sector_sz && 4725 + xfer_cnt % sector_sz)) { 4726 + sdev_printk(KERN_INFO, scmd->device, 4727 + "unaligned partial completion avoided (xfer_cnt=%u, sector_sz=%u)\n", 4728 + xfer_cnt, sector_sz); 4729 + xfer_cnt = round_down(xfer_cnt, sector_sz); 4730 + } 4731 + 4720 4732 scsi_set_resid(scmd, scsi_bufflen(scmd) - xfer_cnt); 4721 4733 if (ioc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) 4722 4734 log_info = le32_to_cpu(mpi_reply->IOCLogInfo); ··· 8762 8746 8763 8747 switch (hba_mpi_version) { 8764 8748 case MPI2_VERSION: 8749 + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | 8750 + PCIE_LINK_STATE_L1 | PCIE_LINK_STATE_CLKPM); 8765 8751 /* Use mpt2sas driver host template for SAS 2.0 HBA's */ 8766 8752 shost = scsi_host_alloc(&mpt2sas_driver_template, 8767 8753 sizeof(struct MPT3SAS_ADAPTER));
+2 -1
drivers/scsi/qla2xxx/qla_isr.c
··· 3242 3242 * from a probe failure context. 3243 3243 */ 3244 3244 if (!ha->rsp_q_map || !ha->rsp_q_map[0]) 3245 - return; 3245 + goto free_irqs; 3246 3246 rsp = ha->rsp_q_map[0]; 3247 3247 3248 3248 if (ha->flags.msix_enabled) { ··· 3262 3262 free_irq(pci_irq_vector(ha->pdev, 0), rsp); 3263 3263 } 3264 3264 3265 + free_irqs: 3265 3266 pci_free_irq_vectors(ha->pdev); 3266 3267 } 3267 3268
+1 -1
drivers/scsi/qla2xxx/qla_os.c
··· 1616 1616 /* Don't abort commands in adapter during EEH 1617 1617 * recovery as it's not accessible/responding. 1618 1618 */ 1619 - if (!ha->flags.eeh_busy) { 1619 + if (GET_CMD_SP(sp) && !ha->flags.eeh_busy) { 1620 1620 /* Get a reference to the sp and drop the lock. 1621 1621 * The reference ensures this sp->done() call 1622 1622 * - and not the call in qla2xxx_eh_abort() -