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:
"This is a set of two fixes which cause oopses (Buslogic, qla2xxx) and
one fix which may cause a hang because of request miscounting (sd)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
[SCSI] sd: call blk_pm_runtime_init before add_disk
[SCSI] qla2xxx: Fix request queue null dereference.
[SCSI] BusLogic: Fix an oops when intializing multimaster adapter

+19 -10
+8 -8
drivers/scsi/BusLogic.c
··· 696 696 while ((pci_device = pci_get_device(PCI_VENDOR_ID_BUSLOGIC, 697 697 PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER, 698 698 pci_device)) != NULL) { 699 - struct blogic_adapter *adapter = adapter; 699 + struct blogic_adapter *host_adapter = adapter; 700 700 struct blogic_adapter_info adapter_info; 701 701 enum blogic_isa_ioport mod_ioaddr_req; 702 702 unsigned char bus; ··· 744 744 known and enabled, note that the particular Standard ISA I/O 745 745 Address should not be probed. 746 746 */ 747 - adapter->io_addr = io_addr; 748 - blogic_intreset(adapter); 749 - if (blogic_cmd(adapter, BLOGIC_INQ_PCI_INFO, NULL, 0, 747 + host_adapter->io_addr = io_addr; 748 + blogic_intreset(host_adapter); 749 + if (blogic_cmd(host_adapter, BLOGIC_INQ_PCI_INFO, NULL, 0, 750 750 &adapter_info, sizeof(adapter_info)) == 751 751 sizeof(adapter_info)) { 752 752 if (adapter_info.isa_port < 6) ··· 762 762 I/O Address assigned at system initialization. 763 763 */ 764 764 mod_ioaddr_req = BLOGIC_IO_DISABLE; 765 - blogic_cmd(adapter, BLOGIC_MOD_IOADDR, &mod_ioaddr_req, 765 + blogic_cmd(host_adapter, BLOGIC_MOD_IOADDR, &mod_ioaddr_req, 766 766 sizeof(mod_ioaddr_req), NULL, 0); 767 767 /* 768 768 For the first MultiMaster Host Adapter enumerated, ··· 779 779 780 780 fetch_localram.offset = BLOGIC_AUTOSCSI_BASE + 45; 781 781 fetch_localram.count = sizeof(autoscsi_byte45); 782 - blogic_cmd(adapter, BLOGIC_FETCH_LOCALRAM, 782 + blogic_cmd(host_adapter, BLOGIC_FETCH_LOCALRAM, 783 783 &fetch_localram, sizeof(fetch_localram), 784 784 &autoscsi_byte45, 785 785 sizeof(autoscsi_byte45)); 786 - blogic_cmd(adapter, BLOGIC_GET_BOARD_ID, NULL, 0, &id, 787 - sizeof(id)); 786 + blogic_cmd(host_adapter, BLOGIC_GET_BOARD_ID, NULL, 0, 787 + &id, sizeof(id)); 788 788 if (id.fw_ver_digit1 == '5') 789 789 force_scan_order = 790 790 autoscsi_byte45.force_scan_order;
+1 -1
drivers/scsi/qla2xxx/qla_dbg.c
··· 20 20 * | Device Discovery | 0x2095 | 0x2020-0x2022, | 21 21 * | | | 0x2011-0x2012, | 22 22 * | | | 0x2016 | 23 - * | Queue Command and IO tracing | 0x3058 | 0x3006-0x300b | 23 + * | Queue Command and IO tracing | 0x3059 | 0x3006-0x300b | 24 24 * | | | 0x3027-0x3028 | 25 25 * | | | 0x303d-0x3041 | 26 26 * | | | 0x302d,0x3033 |
+9
drivers/scsi/qla2xxx/qla_isr.c
··· 1957 1957 que = MSW(sts->handle); 1958 1958 req = ha->req_q_map[que]; 1959 1959 1960 + /* Check for invalid queue pointer */ 1961 + if (req == NULL || 1962 + que >= find_first_zero_bit(ha->req_qid_map, ha->max_req_queues)) { 1963 + ql_dbg(ql_dbg_io, vha, 0x3059, 1964 + "Invalid status handle (0x%x): Bad req pointer. req=%p, " 1965 + "que=%u.\n", sts->handle, req, que); 1966 + return; 1967 + } 1968 + 1960 1969 /* Validate handle. */ 1961 1970 if (handle < req->num_outstanding_cmds) 1962 1971 sp = req->outstanding_cmds[handle];
+1 -1
drivers/scsi/sd.c
··· 2854 2854 gd->events |= DISK_EVENT_MEDIA_CHANGE; 2855 2855 } 2856 2856 2857 + blk_pm_runtime_init(sdp->request_queue, dev); 2857 2858 add_disk(gd); 2858 2859 if (sdkp->capacity) 2859 2860 sd_dif_config_host(sdkp); ··· 2863 2862 2864 2863 sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", 2865 2864 sdp->removable ? "removable " : ""); 2866 - blk_pm_runtime_init(sdp->request_queue, dev); 2867 2865 scsi_autopm_put_device(sdp); 2868 2866 put_device(&sdkp->dev); 2869 2867 }