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:
"Three driver fixes. Two (alua and hpsa) are in hard to trigger
attach/detach situations but the mp3sas one involves a polled to
interrupt switch over that could trigger in any high IOPS situation"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: mpt3sas: Fix timeouts observed while reenabling IRQ
scsi: scsi_dh_alua: Avoid crash during alua_bus_detach()
scsi: hpsa: Fix memory leak in hpsa_init_one()

+15 -5
+5 -4
drivers/scsi/device_handler/scsi_dh_alua.c
··· 658 658 rcu_read_lock(); 659 659 list_for_each_entry_rcu(h, 660 660 &tmp_pg->dh_list, node) { 661 - /* h->sdev should always be valid */ 662 - BUG_ON(!h->sdev); 661 + if (!h->sdev) 662 + continue; 663 663 h->sdev->access_state = desc[0]; 664 664 } 665 665 rcu_read_unlock(); ··· 705 705 pg->expiry = 0; 706 706 rcu_read_lock(); 707 707 list_for_each_entry_rcu(h, &pg->dh_list, node) { 708 - BUG_ON(!h->sdev); 708 + if (!h->sdev) 709 + continue; 709 710 h->sdev->access_state = 710 711 (pg->state & SCSI_ACCESS_STATE_MASK); 711 712 if (pg->pref) ··· 1148 1147 spin_lock(&h->pg_lock); 1149 1148 pg = rcu_dereference_protected(h->pg, lockdep_is_held(&h->pg_lock)); 1150 1149 rcu_assign_pointer(h->pg, NULL); 1151 - h->sdev = NULL; 1152 1150 spin_unlock(&h->pg_lock); 1153 1151 if (pg) { 1154 1152 spin_lock_irq(&pg->lock); ··· 1156 1156 kref_put(&pg->kref, release_port_group); 1157 1157 } 1158 1158 sdev->handler_data = NULL; 1159 + synchronize_rcu(); 1159 1160 kfree(h); 1160 1161 } 1161 1162
+3 -1
drivers/scsi/hpsa.c
··· 8855 8855 /* hook into SCSI subsystem */ 8856 8856 rc = hpsa_scsi_add_host(h); 8857 8857 if (rc) 8858 - goto clean7; /* perf, sg, cmd, irq, shost, pci, lu, aer/h */ 8858 + goto clean8; /* lastlogicals, perf, sg, cmd, irq, shost, pci, lu, aer/h */ 8859 8859 8860 8860 /* Monitor the controller for firmware lockups */ 8861 8861 h->heartbeat_sample_interval = HEARTBEAT_SAMPLE_INTERVAL; ··· 8870 8870 HPSA_EVENT_MONITOR_INTERVAL); 8871 8871 return 0; 8872 8872 8873 + clean8: /* lastlogicals, perf, sg, cmd, irq, shost, pci, lu, aer/h */ 8874 + kfree(h->lastlogicals); 8873 8875 clean7: /* perf, sg, cmd, irq, shost, pci, lu, aer/h */ 8874 8876 hpsa_free_performant_mode(h); 8875 8877 h->access.set_intr_mask(h, HPSA_INTR_OFF);
+7
drivers/scsi/mpt3sas/mpt3sas_base.c
··· 1740 1740 reply_q->irq_poll_scheduled = false; 1741 1741 reply_q->irq_line_enable = true; 1742 1742 enable_irq(reply_q->os_irq); 1743 + /* 1744 + * Go for one more round of processing the 1745 + * reply descriptor post queue incase if HBA 1746 + * Firmware has posted some reply descriptors 1747 + * while reenabling the IRQ. 1748 + */ 1749 + _base_process_reply_queue(reply_q); 1743 1750 } 1744 1751 1745 1752 return num_entries;