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:
"The megaraid_sas patch in here fixes a major regression in the last
fix set that made all megaraid_sas cards unusable. It turns out no-one
had actually tested such an "obvious" fix, sigh. The fix for the fix
has been tested ...

The next most serious is the vmw_pvscsi abort problem which basically
means that aborts don't work on the vmware paravirt devices and error
handling always escalates to reset.

The rest are an assortment of missed reference counting in certain
paths and corner case bugs that show up on some architectures"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression
scsi: qla2xxx: fix invalid DMA access after command aborts in PCI device remove
scsi: qla2xxx: do not queue commands when unloading
scsi: libcxgbi: fix incorrect DDP resource cleanup
scsi: qla2xxx: Fix scsi scan hang triggered if adapter fails during init
scsi: scsi_dh_alua: Fix a reference counting bug
scsi: vmw_pvscsi: return SUCCESS for successful command aborts
scsi: mpt3sas: Fix for block device of raid exists even after deleting raid disk
scsi: scsi_dh_alua: fix missing kref_put() in alua_rtpg_work()

+29 -8
+2 -1
drivers/scsi/cxgbi/libcxgbi.c
··· 2081 2081 /* never reached the xmit task callout */ 2082 2082 if (tdata->skb) 2083 2083 __kfree_skb(tdata->skb); 2084 - memset(tdata, 0, sizeof(*tdata)); 2085 2084 2086 2085 task_release_itt(task, task->hdr_itt); 2086 + memset(tdata, 0, sizeof(*tdata)); 2087 + 2087 2088 iscsi_tcp_cleanup_task(task); 2088 2089 } 2089 2090 EXPORT_SYMBOL_GPL(cxgbi_cleanup_task);
+4 -1
drivers/scsi/device_handler/scsi_dh_alua.c
··· 793 793 WARN_ON(pg->flags & ALUA_PG_RUN_RTPG); 794 794 WARN_ON(pg->flags & ALUA_PG_RUN_STPG); 795 795 spin_unlock_irqrestore(&pg->lock, flags); 796 + kref_put(&pg->kref, release_port_group); 796 797 return; 797 798 } 798 799 if (pg->flags & ALUA_SYNC_STPG) ··· 891 890 /* Do not queue if the worker is already running */ 892 891 if (!(pg->flags & ALUA_PG_RUNNING)) { 893 892 kref_get(&pg->kref); 893 + sdev = NULL; 894 894 start_queue = 1; 895 895 } 896 896 } ··· 903 901 if (start_queue && 904 902 !queue_delayed_work(alua_wq, &pg->rtpg_work, 905 903 msecs_to_jiffies(ALUA_RTPG_DELAY_MSECS))) { 906 - scsi_device_put(sdev); 904 + if (sdev) 905 + scsi_device_put(sdev); 907 906 kref_put(&pg->kref, release_port_group); 908 907 } 909 908 }
+1 -1
drivers/scsi/megaraid/megaraid_sas.h
··· 2233 2233 }; 2234 2234 2235 2235 #define MEGASAS_IS_LOGICAL(scp) \ 2236 - (scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1 2236 + ((scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1) 2237 2237 2238 2238 #define MEGASAS_DEV_INDEX(scp) \ 2239 2239 (((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) + \
+2 -2
drivers/scsi/mpt3sas/mpt3sas_scsih.c
··· 1273 1273 sas_target_priv_data->handle = raid_device->handle; 1274 1274 sas_target_priv_data->sas_address = raid_device->wwid; 1275 1275 sas_target_priv_data->flags |= MPT_TARGET_FLAGS_VOLUME; 1276 - sas_target_priv_data->raid_device = raid_device; 1277 1276 if (ioc->is_warpdrive) 1278 - raid_device->starget = starget; 1277 + sas_target_priv_data->raid_device = raid_device; 1278 + raid_device->starget = starget; 1279 1279 } 1280 1280 spin_unlock_irqrestore(&ioc->raid_device_lock, flags); 1281 1281 return 0;
+16
drivers/scsi/qla2xxx/qla_os.c
··· 707 707 srb_t *sp; 708 708 int rval; 709 709 710 + if (unlikely(test_bit(UNLOADING, &base_vha->dpc_flags))) { 711 + cmd->result = DID_NO_CONNECT << 16; 712 + goto qc24_fail_command; 713 + } 714 + 710 715 if (ha->flags.eeh_busy) { 711 716 if (ha->flags.pci_channel_io_perm_failure) { 712 717 ql_dbg(ql_dbg_aer, vha, 0x9010, ··· 1456 1451 for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) { 1457 1452 sp = req->outstanding_cmds[cnt]; 1458 1453 if (sp) { 1454 + /* Get a reference to the sp and drop the lock. 1455 + * The reference ensures this sp->done() call 1456 + * - and not the call in qla2xxx_eh_abort() - 1457 + * ends the SCSI command (with result 'res'). 1458 + */ 1459 + sp_get(sp); 1460 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 1461 + qla2xxx_eh_abort(GET_CMD_SP(sp)); 1462 + spin_lock_irqsave(&ha->hardware_lock, flags); 1459 1463 req->outstanding_cmds[cnt] = NULL; 1460 1464 sp->done(vha, sp, res); 1461 1465 } ··· 2355 2341 { 2356 2342 scsi_qla_host_t *vha = shost_priv(shost); 2357 2343 2344 + if (test_bit(UNLOADING, &vha->dpc_flags)) 2345 + return 1; 2358 2346 if (!vha->host) 2359 2347 return 1; 2360 2348 if (time > vha->hw->loop_reset_delay * HZ)
+3 -2
drivers/scsi/vmw_pvscsi.c
··· 793 793 unsigned long flags; 794 794 int result = SUCCESS; 795 795 DECLARE_COMPLETION_ONSTACK(abort_cmp); 796 + int done; 796 797 797 798 scmd_printk(KERN_DEBUG, cmd, "task abort on host %u, %p\n", 798 799 adapter->host->host_no, cmd); ··· 825 824 pvscsi_abort_cmd(adapter, ctx); 826 825 spin_unlock_irqrestore(&adapter->hw_lock, flags); 827 826 /* Wait for 2 secs for the completion. */ 828 - wait_for_completion_timeout(&abort_cmp, msecs_to_jiffies(2000)); 827 + done = wait_for_completion_timeout(&abort_cmp, msecs_to_jiffies(2000)); 829 828 spin_lock_irqsave(&adapter->hw_lock, flags); 830 829 831 - if (!completion_done(&abort_cmp)) { 830 + if (!done) { 832 831 /* 833 832 * Failed to abort the command, unmark the fact that it 834 833 * was requested to be aborted.
+1 -1
drivers/scsi/vmw_pvscsi.h
··· 26 26 27 27 #include <linux/types.h> 28 28 29 - #define PVSCSI_DRIVER_VERSION_STRING "1.0.6.0-k" 29 + #define PVSCSI_DRIVER_VERSION_STRING "1.0.7.0-k" 30 30 31 31 #define PVSCSI_MAX_NUM_SG_ENTRIES_PER_SEGMENT 128 32 32