Commit ee40fb29 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull SCSI fixes from James Bottomley:
 "Three fixes.  One is the qla24xx MSI regression, one is a theoretical
  problem over blacklist matching, which would bite USB badly if it ever
  triggered and one is a system hang with a particular type of IPR
  device"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  qla2xxx: Fix NULL pointer deref in QLA interrupt
  SCSI: fix new bug in scsi_dev_info_list string matching
  ipr: Clear interrupt on croc/crocodile when running with LSI
parents b987c759 ea1a25c3
...@@ -10093,6 +10093,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev, ...@@ -10093,6 +10093,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
ioa_cfg->intr_flag = IPR_USE_MSI; ioa_cfg->intr_flag = IPR_USE_MSI;
else { else {
ioa_cfg->intr_flag = IPR_USE_LSI; ioa_cfg->intr_flag = IPR_USE_LSI;
ioa_cfg->clear_isr = 1;
ioa_cfg->nvectors = 1; ioa_cfg->nvectors = 1;
dev_info(&pdev->dev, "Cannot enable MSI.\n"); dev_info(&pdev->dev, "Cannot enable MSI.\n");
} }
......
...@@ -2548,7 +2548,7 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha, ...@@ -2548,7 +2548,7 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha,
if (!vha->flags.online) if (!vha->flags.online)
return; return;
if (rsp->msix->cpuid != smp_processor_id()) { if (rsp->msix && rsp->msix->cpuid != smp_processor_id()) {
/* if kernel does not notify qla of IRQ's CPU change, /* if kernel does not notify qla of IRQ's CPU change,
* then set it here. * then set it here.
*/ */
......
...@@ -429,7 +429,7 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor, ...@@ -429,7 +429,7 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor,
* here, and we don't know what device it is * here, and we don't know what device it is
* trying to work with, leave it as-is. * trying to work with, leave it as-is.
*/ */
vmax = 8; /* max length of vendor */ vmax = sizeof(devinfo->vendor);
vskip = vendor; vskip = vendor;
while (vmax > 0 && *vskip == ' ') { while (vmax > 0 && *vskip == ' ') {
vmax--; vmax--;
...@@ -439,7 +439,7 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor, ...@@ -439,7 +439,7 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor,
while (vmax > 0 && vskip[vmax - 1] == ' ') while (vmax > 0 && vskip[vmax - 1] == ' ')
--vmax; --vmax;
mmax = 16; /* max length of model */ mmax = sizeof(devinfo->model);
mskip = model; mskip = model;
while (mmax > 0 && *mskip == ' ') { while (mmax > 0 && *mskip == ' ') {
mmax--; mmax--;
...@@ -455,10 +455,12 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor, ...@@ -455,10 +455,12 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor,
* Behave like the older version of get_device_flags. * Behave like the older version of get_device_flags.
*/ */
if (memcmp(devinfo->vendor, vskip, vmax) || if (memcmp(devinfo->vendor, vskip, vmax) ||
devinfo->vendor[vmax]) (vmax < sizeof(devinfo->vendor) &&
devinfo->vendor[vmax]))
continue; continue;
if (memcmp(devinfo->model, mskip, mmax) || if (memcmp(devinfo->model, mskip, mmax) ||
devinfo->model[mmax]) (mmax < sizeof(devinfo->model) &&
devinfo->model[mmax]))
continue; continue;
return devinfo; return devinfo;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment