summaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_nvme.h
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2017-04-22 03:49:08 +0300
committerChristoph Hellwig <hch@lst.de>2017-04-25 21:00:58 +0300
commitbbe3012b73b592dfe5f4340a14373840f51887b6 (patch)
treebcc1fa183ac7c391c3a002c3bfd6bb6446a99fe8 /drivers/scsi/lpfc/lpfc_nvme.h
parent51f397642c890e6c54e2532110c84519f1d12e4c (diff)
downloadlinux-bbe3012b73b592dfe5f4340a14373840f51887b6.tar.xz
lpfc: Fix memory corruption of the lpfc_ncmd->list pointers
lpfc was changing the private pointer that is set/maintained by the nvme_fc transport. This caused two issues: a) the transport, on teardown may erroneous attempt to free whatever address was set; and b) lfpc uses any value set in lpfc_nvme_fcp_abort() and assumes its a valid io request. Correct issue by properly defining a context structure for lpfc. Lpfc also updated to clear the private context structure on io completion. Since this bug caused scrutiny of the way lpfc moves local request structures between lists, also cleaned up list_del()'s to list_del_inits()'s. This is a nvme-specific bug. The patch was cut against the linux-block tree, for-4.12/block tree. It should be pulled in through that tree. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nvme.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_nvme.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nvme.h b/drivers/scsi/lpfc/lpfc_nvme.h
index 2582f46edf05..ec32f45daa66 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.h
+++ b/drivers/scsi/lpfc/lpfc_nvme.h
@@ -97,3 +97,7 @@ struct lpfc_nvme_buf {
uint64_t ts_data_nvme;
#endif
};
+
+struct lpfc_nvme_fcpreq_priv {
+ struct lpfc_nvme_buf *nvme_buf;
+};