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
..
2020-02-07 12:51:54 -08:00
2020-01-29 18:53:37 -08:00
2020-02-06 06:11:50 +00:00
2020-02-08 14:04:19 -08:00
2020-02-08 14:04:19 -08:00
2020-02-08 14:17:27 -08:00
2020-02-08 14:17:27 -08:00
2020-02-08 14:04:19 -08:00
2020-02-08 14:04:19 -08:00
2020-02-08 13:58:44 -08:00
2020-01-27 13:03:00 -08:00
2020-02-08 14:04:19 -08:00
2020-02-09 16:05:50 -08:00
2020-01-30 08:04:01 -08:00
2020-02-08 14:04:19 -08:00
2020-02-04 07:17:41 +00:00
2020-01-31 14:40:36 -08:00
2020-02-05 17:49:54 +00:00
2020-02-04 13:06:46 +00:00
2020-02-04 07:17:41 +00:00
2020-01-16 10:45:44 -08:00
2020-02-04 07:17:41 +00:00
2020-01-27 13:03:00 -08:00
2020-02-08 14:04:19 -08:00
2020-01-27 13:03:00 -08:00
2020-02-06 14:17:38 +00:00
2020-02-08 13:55:25 -08:00
2020-02-03 14:51:57 +00:00
2020-02-04 07:17:41 +00:00
2020-02-08 14:04:19 -08:00
2020-01-31 11:28:31 -08:00
2020-02-08 14:04:19 -08:00
2020-02-09 16:05:50 -08:00
2020-02-03 22:22:05 +00:00
2020-02-09 16:05:50 -08:00
2020-01-29 10:35:54 -08:00
2020-01-29 10:35:54 -08:00
2020-02-07 12:30:16 -08:00
2020-02-05 17:44:14 +00:00
2020-02-09 16:05:50 -08:00