Long Li
1bad6c4a57
scsi: zero per-cmd private driver data for each MQ I/O
...
In lower layer driver's (LLD) scsi_host_template, the driver may
optionally ask SCSI to allocate its private driver memory for each
command, by specifying cmd_size. This memory is allocated at the end of
scsi_cmnd by SCSI. Later when SCSI queues a command, the LLD can use
scsi_cmd_priv to get to its private data.
Some LLD, e.g. hv_storvsc, doesn't clear its private data before use. In
this case, the LLD may get to stale or uninitialized data in its private
driver memory. This may result in unexpected driver and hardware
behavior.
Fix this problem by also zeroing the private driver memory before
passing them to LLD.
Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Reviewed-by: KY Srinivasan <kys@microsoft.com>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
CC: <stable@vger.kernel.org> # 4.11+
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-05-18 21:44:49 -04:00
..
aacraid
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
aic7xxx
scsi: aic7xxx: fix order of arguments in function prototype
2017-04-19 22:17:23 -04:00
aic94xx
scsi: sas: move scsi_remove_host call into sas_remove_host
2017-04-21 10:34:29 -04:00
arcmsr
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
arm
scsi: ncr5380: Use correct types for DMA routines
2016-11-08 17:29:48 -05:00
be2iscsi
scsi: be2iscsi: switch to pci_alloc_irq_vectors
2017-03-30 11:37:16 -04:00
bfa
scsi: bfa: use designated initializers
2017-04-21 10:11:34 -04:00
bnx2fc
sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h>
2017-03-02 08:42:29 +01:00
bnx2i
sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h>
2017-03-02 08:42:29 +01:00
csiostor
scsi: csiostor: fix use after free in csio_hw_use_fwconfig()
2017-05-18 21:37:27 -04:00
cxgbi
scsi: cxgb4i: update module description
2017-04-18 21:55:03 -04:00
cxlflash
scsi: cxlflash: Select IRQ_POLL
2017-05-08 22:09:21 -04:00
device_handler
scsi: scsi_dh_alua: Warn if the first argument of alua_rtpg_queue() is NULL
2017-03-19 13:16:37 -04:00
dpt
esas2r
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
fcoe
scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static
2017-04-25 13:00:59 -04:00
fnic
scsi: fnic: bug fix for fip.fip_subcode in fnic_fcoe_send_vlan_req
2017-03-23 09:57:23 -04:00
hisi_sas
scsi: sas: move scsi_remove_host call into sas_remove_host
2017-04-21 10:34:29 -04:00
ibmvscsi
scsi: ibmvfc: don't check for failure from mempool_alloc()
2017-04-18 21:50:29 -04:00
ibmvscsi_tgt
ibmvscsis: Add SGL limit
2017-02-08 10:51:24 -08:00
isci
scsi: sas: move scsi_remove_host call into sas_remove_host
2017-04-21 10:34:29 -04:00
libfc
scsi: libfc: fix incorrect variable assignment
2017-05-16 21:08:42 -04:00
libsas
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
lpfc
scsi: lpfc: fix build issue if NVME_FC_TARGET is not defined
2017-05-17 20:22:47 -04:00
megaraid
scsi: megaraid_sas: Driver version upgrade
2017-03-13 22:59:53 -04:00
mpt3sas
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
mvsas
scsi: sas: move scsi_remove_host call into sas_remove_host
2017-04-21 10:34:29 -04:00
osd
char/misc patches for 4.12-rc1
2017-05-04 19:15:35 -07:00
pcmcia
pm8001
scsi: sas: move scsi_remove_host call into sas_remove_host
2017-04-21 10:34:29 -04:00
qedf
scsi: qedf: Avoid reading past end of buffer
2017-05-08 22:07:48 -04:00
qedi
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
qla2xxx
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
qla4xxx
scsi: qla4xxx: fix spelling mistake: "Tempalate" -> "Template"
2017-04-26 18:34:34 -04:00
smartpqi
scsi: smartpqi: fix time handling
2017-02-22 18:41:42 -05:00
snic
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
sym53c8xx_2
scsi: sym53c8xx_2: Use complete() instead complete_all()
2016-09-14 13:19:29 -04:00
ufs
scsi: ufs: Clean up some rpm/spm level SysFS nodes upon remove
2017-05-18 21:29:21 -04:00
.gitignore
3w-9xxx.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
3w-9xxx.h
scsi: Update 3ware driver email addresses
2016-12-14 15:25:12 -05:00
3w-sas.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
3w-sas.h
scsi: Update 3ware driver email addresses
2016-12-14 15:25:12 -05:00
3w-xxxx.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
3w-xxxx.h
scsi: Update 3ware driver email addresses
2016-12-14 15:25:12 -05:00
53c700.c
53c700.h
53c700.scr
53c700_d.h_shipped
a100u2w.c
a100u2w.h
a2091.c
a2091.h
a3000.c
a3000.h
a4000t.c
advansys.c
scsi: advansys: fix uninitialized data access
2017-04-04 19:39:39 -04:00
aha152x.c
aha152x.h
aha1542.c
aha1542.h
aha1740.c
aha1740.h
am53c974.c
atari_scsi.c
scsi: atari_scsi: Reset DMA during bus reset only under ST-DMA lock
2017-01-31 21:39:22 -05:00
atp870u.c
atp870u.h
BusLogic.c
scsi: BusLogic: fix incorrect spelling of adatper_reset_req
2017-04-21 10:31:33 -04:00
BusLogic.h
scsi: BusLogic: fix incorrect spelling of adatper_reset_req
2017-04-21 10:31:33 -04:00
bvme6000_scsi.c
ch.c
constants.c
scsi: fix upper bounds check of sense key in scsi_sense_key_string()
2016-08-16 00:49:32 -04:00
dc395x.c
dc395x.h
dmx3191d.c
scsi: dmx3191d: use module_pci_driver
2016-11-16 20:43:50 -05:00
dpt_i2o.c
scsi: dpt_i2o: double free if adpt_i2o_online_hba() fails
2017-01-05 00:21:12 -05:00
dpti.h
eata.c
eata_generic.h
eata_pio.c
eata_pio.h
esp_scsi.c
esp_scsi.h
fdomain.c
fdomain.h
FlashPoint.c
g_NCR5380.c
scsi: ncr5380: Reduce #include files
2017-01-31 21:38:15 -05:00
gdth.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
gdth.h
gdth_ioctl.h
gdth_proc.c
gdth_proc.h
gvp11.c
gvp11.h
hosts.c
scsi: allocate scsi_cmnd structures as part of struct request
2017-01-27 15:08:35 -07:00
hpsa.c
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
hpsa.h
scsi: hpsa: limit outstanding rescans
2017-03-15 13:37:10 -04:00
hpsa_cmd.h
scsi: hpsa: update check for logical volume status
2017-03-15 13:36:22 -04:00
hptiop.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
hptiop.h
imm.c
imm.h
initio.c
initio.h
ipr.c
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
ipr.h
scsi: ipr: Driver version 2.6.4
2017-03-23 12:04:05 -04:00
ips.c
scsi: ips: don't use custom hex_asc_upper[] table
2016-11-08 17:29:57 -05:00
ips.h
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
iscsi_boot_sysfs.c
iscsi_tcp.c
sched/core: Remove 'task' parameter and rename tsk_restore_flags() to current_restore_flags()
2017-04-11 09:06:32 +02:00
iscsi_tcp.h
jazz_esp.c
Kconfig
scsi: lpfc: Finalize Kconfig options for nvme
2017-03-15 13:37:18 -04:00
lasi700.c
libiscsi.c
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
libiscsi_tcp.c
mac53c94.c
mac53c94.h
mac_esp.c
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
mac_scsi.c
scsi: ncr5380: Resolve various static checker warnings
2017-01-31 21:38:35 -05:00
Makefile
scsi: Implement blk_mq_ops.show_rq()
2017-04-26 15:09:04 -06:00
megaraid.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
megaraid.h
mesh.c
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
mvumi.c
scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case
2017-04-24 18:16:49 -04:00
mvumi.h
ncr53c8xx.c
ncr53c8xx.h
NCR53c406a.c
NCR5380.c
scsi: ncr5380: Improve target selection robustness
2017-01-31 21:38:58 -05:00
NCR5380.h
scsi: ncr5380: Clean up dead code and redundant macro usage
2017-01-31 21:37:44 -05:00
NCR_D700.c
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
nsp32.c
nsp32.h
nsp32_debug.c
nsp32_io.h
osst.c
scsi: introduce a result field in struct scsi_request
2017-04-20 12:16:10 -06:00
osst.h
osst_detect.h
osst_options.h
pmcraid.c
scsi: pmcraid: remove redundant check to see if request_size is less than zero
2017-05-08 22:16:45 -04:00
pmcraid.h
scsi: pmcraid: fix endianess sparse annotations
2017-04-24 18:11:22 -04:00
ppa.c
ppa.h
ps3rom.c
qla1280.c
qla1280.h
qlogicfas.c
qlogicfas408.c
qlogicfas408.h
qlogicpti.c
qlogicpti.h
qlogicpti: Fix compiler warnings
2016-11-28 15:51:31 -05:00
raid_class.c
script_asm.pl
scsi.c
scsi: Skip deleted devices in __scsi_device_lookup
2017-05-08 21:36:06 -04:00
scsi.h
scsi_common.c
scsi: always zero sshdr in scsi_normalize_sense
2017-02-22 19:33:00 -05:00
scsi_debug.c
scsi: scsi_debug: Add OPTIMAL TRANSFER LENGTH GRANULARITY option.
2017-01-31 22:08:44 -05:00
scsi_debugfs.c
scsi: Implement blk_mq_ops.show_rq()
2017-04-26 15:09:04 -06:00
scsi_debugfs.h
scsi: Implement blk_mq_ops.show_rq()
2017-04-26 15:09:04 -06:00
scsi_devinfo.c
scsi: scsi_devinfo: remove synchronous ALUA for NETAPP devices
2016-12-07 18:13:52 -05:00
scsi_dh.c
scsi: use 'scsi_device_from_queue()' for scsi_dh
2017-02-22 18:41:42 -05:00
scsi_error.c
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
scsi_ioctl.c
scsi: make the sense header argument to scsi_test_unit_ready mandatory
2017-02-22 19:35:24 -05:00
scsi_lib.c
scsi: zero per-cmd private driver data for each MQ I/O
2017-05-18 21:44:49 -04:00
scsi_lib_dma.c
scsi_logging.c
scsi_logging.h
scsi_module.c
scsi_netlink.c
netlink: extended ACK reporting
2017-04-13 13:58:20 -04:00
scsi_pm.c
scsi_priv.h
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
scsi_proc.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
scsi_sas_internal.h
scsi_scan.c
scsi: Remove one useless stack variable
2016-10-11 18:02:09 -04:00
scsi_sysctl.c
scsi_sysfs.c
scsi: avoid a permanent stop of the scsi device's request queue
2016-12-14 15:51:17 -05:00
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c
scsi: scsi_transport_fc: Add dummy initiator role to rport
2017-04-19 19:13:52 -04:00
scsi_transport_iscsi.c
scsi: scsi_transport_iscsi: Use flush_work in iscsi_remove_session
2017-03-27 22:03:33 -04:00
scsi_transport_sas.c
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
scsi_transport_spi.c
scsi: merge __scsi_execute into scsi_execute
2017-02-23 16:57:19 -05:00
scsi_transport_srp.c
scsi: remove tsk_mgmt_response and it_nexus_response transport methods
2017-02-06 19:10:41 -05:00
scsi_typedefs.h
scsicam.c
sd.c
scsi: sd: Ignore sync cache failures when not supported
2017-05-16 21:07:24 -04:00
sd.h
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
sd_dif.c
scsi: sd: Move DIF protection types to t10-pi.h
2016-09-15 09:51:14 -04:00
sd_zbc.c
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
sense_codes.h
ses.c
scsi: ses: don't get power status of SES device slot on probe
2017-04-06 12:48:05 -04:00
sg.c
scsi: sg: don't return bogus Sg_requests
2017-05-11 23:14:36 -04:00
sgiwd93.c
scsi: remove incorrect __exit markups
2017-03-15 19:27:46 -04:00
sim710.c
sni_53c710.c
scsi: remove incorrect __exit markups
2017-03-15 19:27:46 -04:00
sr.c
scsi: sr: Sanity check returned mode data
2017-04-07 17:07:14 -04:00
sr.h
sr_ioctl.c
scsi: merge __scsi_execute into scsi_execute
2017-02-23 16:57:19 -05:00
sr_vendor.c
st.c
scsi: introduce a result field in struct scsi_request
2017-04-20 12:16:10 -06:00
st.h
st_options.h
stex.c
scsi: stex: make S6flag static
2017-04-26 18:32:29 -04:00
storvsc_drv.c
SCSI misc on 20170503
2017-05-04 12:19:44 -07:00
sun3_scsi.c
SCSI misc on 20170220
2017-02-21 11:51:42 -08:00
sun3_scsi_vme.c
sun3x_esp.c
sun_esp.c
sym53c416.c
sym53c416.h
virtio_scsi.c
scsi: virtio_scsi: Always try to read VPD pages
2017-04-19 19:12:11 -04:00
vmw_pvscsi.c
scsi: vmw_pvscsi: handle the return value from pci_alloc_irq_vectors correctly
2017-03-06 22:27:33 -05:00
vmw_pvscsi.h
scsi: vmw_pvscsi: switch to pci_alloc_irq_vectors
2017-01-11 22:31:03 -05:00
wd33c93.c
wd33c93.h
wd719x.c
drivers/scsi/wd719x.c: remove last declaration using DEFINE_PCI_DEVICE_TABLE
2016-09-01 17:52:01 -07:00
wd719x.h
xen-scsifront.c
xen/scsifront: use offset_in_page() macro
2017-05-02 11:14:53 +02:00
zalon.c
scsi: remove incorrect __exit markups
2017-03-15 19:27:46 -04:00
zorro7xx.c