Skip to contentSkip to conversation

lpfc: Fix EEH encountering oops with nvme traffic

PATCH Applied James Smart 3 participants 3 messages Jan 27, 2021 – Jan 29, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lpfc: Fix EEH encountering oops with nvme traffic

In testing, in a configuration with Redfish and native nvme multipath when an EEH is injected, a kernel oops is being encountered:
(unreliable)

lpfc_nvme_ls_req+0x328/0x720 [lpfc]
__nvme_fc_send_ls_req.constprop.13+0x1d8/0x3d0 [nvme_fc]
nvme_fc_create_association+0x224/0xd10 [nvme_fc]
nvme_fc_reset_ctrl_work+0x110/0x154 [nvme_fc]
process_one_work+0x304/0x5d

the nvme transport is issuing a Disconnect LS request, which the driver receives and tries to post but the work queue used by the driver is already being torn down by the eeh.

Fix by validating the validity of the work queue before proceeding with the LS transmit.

---
 drivers/scsi/lpfc/lpfc_nvme.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/lpfc/lpfc_nvme.c +3 -0
index 5e990f4c1ca6..4d819e52496a 100644
@@ -559,6 +559,9 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
 		return -ENODEV;
 	}
 
+	if (!vport->phba->sli4_hba.nvmels_wq)
+		return -ENOMEM;
+
 	/*
 	 * there are two dma buf in the request, actually there is one and
 	 * the second one is just the start address + cmd size.
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 38 lines · James Smart

In testing, in a configuration with Redfish and native nvme multipath when an EEH is injected, a kernel oops is being encountered:
(unreliable)

lpfc_nvme_ls_req+0x328/0x720 [lpfc]
__nvme_fc_send_ls_req.constprop.13+0x1d8/0x3d0 [nvme_fc]
nvme_fc_create_association+0x224/0xd10 [nvme_fc]
nvme_fc_reset_ctrl_work+0x110/0x154 [nvme_fc]
process_one_work+0x304/0x5d

the nvme transport is issuing a Disconnect LS request, which the driver
receives and tries to post but the work queue used by the driver is already being torn down by the eeh.

Fix by validating the validity of the work queue before proceeding with
the LS transmit.

---
 drivers/scsi/lpfc/lpfc_nvme.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/lpfc/lpfc_nvme.c +3 -0
index 5e990f4c1ca6..4d819e52496a 100644
@@ -559,6 +559,9 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport,
 struct lpfc_nodelist *ndlp,
 		return -ENODEV;
 	}
 
+	if (!vport->phba->sli4_hba.nvmels_wq)
+		return -ENOMEM;
+
 	/*
 	 * there are two dma buf in the request, actually there is one
Quoted 2 lines

and
* the second one is just the start address + cmd size.

#2 lore raw
In reply to James Smart
Quoted 10 lines · James Smart

In testing, in a configuration with Redfish and native nvme multipath when an EEH is injected, a kernel oops is being encountered:
(unreliable)

lpfc_nvme_ls_req+0x328/0x720 [lpfc]
__nvme_fc_send_ls_req.constprop.13+0x1d8/0x3d0 [nvme_fc]
nvme_fc_create_association+0x224/0xd10 [nvme_fc]
nvme_fc_reset_ctrl_work+0x110/0x154 [nvme_fc]
process_one_work+0x304/0x5d

[...]

Applied to 5.11/scsi-fixes, thanks!

[1/1] lpfc: Fix EEH encountering oops with nvme traffic

      https://git.kernel.org/mkp/scsi/c/8c65830ae162
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering