linux_dsm_epyc7002/drivers/scsi/lpfc
James Smart e7f4034912 scsi: lpfc: Fix lpfc overwrite of sg_cnt field in nvmefc_tgt_fcp_req
In lpfc_nvmet_prep_fcp_wqe() the line "rsp->sg_cnt = 0" is modifying the
transport's data structure. This may result in the transport believing the
s/g list was already freed, thus may not unmap/free it properly.  Lpfc
driver should not modify the transport data structure.

The zeroing of the sg_cnt is to avoid use of the transport's sgl in a
subsequent loop where the driver builds the necessary requests for the
adapter firmware to complete the IO.

Change LLDD to use a local copy of the transport sg_cnt when building
requests to be passed to the adapter fw.

Link: https://lore.kernel.org/r/20200322181304.37655-4-jsmart2021@gmail.com
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-03-26 23:15:07 -04:00
..
lpfc_attr.c scsi: lpfc: Copyright updates for 12.6.0.4 patches 2020-02-10 22:46:56 -05:00
lpfc_attr.h
lpfc_bsg.c scsi: lpfc: Fix memory leak on lpfc_bsg_write_ebuf_set func 2019-12-09 18:07:34 -05:00
lpfc_bsg.h scsi: lpfc: Update Copyright in driver version 2019-03-19 13:15:10 -04:00
lpfc_compat.h
lpfc_crtn.h scsi: lpfc: add RDF registration and Link Integrity FPIN logging 2020-02-18 00:08:38 -05:00
lpfc_ct.c scsi: lpfc: Copyright updates for 12.6.0.4 patches 2020-02-10 22:46:56 -05:00
lpfc_debugfs.c block, scsi: final compat_ioctl cleanup 2020-01-10 00:14:46 -05:00
lpfc_debugfs.h scsi: lpfc: Merge per-protocol WQ/CQ pairs into single per-cpu pair 2019-08-19 22:41:12 -04:00
lpfc_disc.h scsi: lpfc: Add NVMe sequence level error recovery support 2019-08-19 22:41:12 -04:00
lpfc_els.c scsi: lpfc: fix spelling mistake "Notication" -> "Notification" 2020-02-24 15:18:14 -05:00
lpfc_hbadisc.c scsi: lpfc: add RDF registration and Link Integrity FPIN logging 2020-02-18 00:08:38 -05:00
lpfc_hw4.h scsi: lpfc: add RDF registration and Link Integrity FPIN logging 2020-02-18 00:08:38 -05:00
lpfc_hw.h scsi: lpfc: add RDF registration and Link Integrity FPIN logging 2020-02-18 00:08:38 -05:00
lpfc_ids.h
lpfc_init.c scsi: lpfc: Fix lockdep error - register non-static key 2020-03-26 23:15:06 -04:00
lpfc_logmsg.h scsi: lpfc: Add log macros to allow print by serverity or verbosity setting 2019-10-24 21:02:05 -04:00
lpfc_mbox.c scsi: lpfc: Add FC-AL support to lpe32000 models 2019-10-24 21:02:06 -04:00
lpfc_mem.c scsi: lpfc: Remove lock contention target write path 2019-10-24 21:02:05 -04:00
lpfc_nl.h
lpfc_nportdisc.c scsi: lpfc: Make lpfc_defer_acc_rsp static 2020-01-10 01:23:47 -05:00
lpfc_nvme.c for-linus-20191212 2019-12-13 14:27:19 -08:00
lpfc_nvme.h SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
lpfc_nvmet.c scsi: lpfc: Fix lpfc overwrite of sg_cnt field in nvmefc_tgt_fcp_req 2020-03-26 23:15:07 -04:00
lpfc_nvmet.h scsi: lpfc: Remove lock contention target write path 2019-10-24 21:02:05 -04:00
lpfc_scsi.c scsi: lpfc: Copyright updates for 12.6.0.4 patches 2020-02-10 22:46:56 -05:00
lpfc_scsi.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_sli4.h scsi: lpfc: Change default IRQ model on AMD architectures 2019-11-06 00:04:04 -05:00
lpfc_sli.c scsi: lpfc: Fix lockdep error - register non-static key 2020-03-26 23:15:06 -04:00
lpfc_sli.h scsi: lpfc: Fix bad ndlp ptr in xri aborted handling 2019-10-24 21:02:04 -04:00
lpfc_version.h scsi: lpfc: Copyright updates for 12.6.0.4 patches 2020-02-10 22:46:56 -05:00
lpfc_vport.c scsi: lpfc: Fix issuing init_vpi mbox on SLI-3 card 2019-08-19 22:41:09 -04:00
lpfc_vport.h
lpfc.h scsi: lpfc: add RDF registration and Link Integrity FPIN logging 2020-02-18 00:08:38 -05:00
Makefile