Home
last modified time | relevance | path

Searched hist:"4550 f9c7" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/scsi/lpfc/
H A Dlpfc_nvmet.c4550f9c7 Fri Jun 16 00:56:49 CDT 2017 James Smart <jsmart2021@gmail.com> scsi: lpfc: Fix crash in lpfc_sli_ringtxcmpl_put when nvmet gets an abort request.

When running nvme detach-ns /dev/nvme0n1 -n 1 command, the nvmet lpfc
driver crashes with this stack dump:

kernel BUG at /root/NVME/lpfc_8.4/lpfc_sli.c:1393!
invalid opcode: 0000 [#1] SMP
Workqueue: nvmet-fc-cpu0 nvmet_fc_do_work_on_cpu [nvmet_fc]
lpfc_sli4_issue_wqe+0x357/0x440 [lpfc]
lpfc_nvmet_xmt_fcp_abort+0x36b/0x5c0 [lpfc]
nvmet_fc_abort_op+0x30/0x50 [nvmet_fc]
nvmet_fc_do_work_on_cpu+0xd9/0x130 [nvmet_fc]
process_one_work+0x14e/0x410
worker_thread+0x116/0x490
kthread+0xc7/0xe0
ret_from_fork+0x3f/0x70

Crash is due to an uninitialized iocbq->vport pointer.

Explicitly set the iocbq->vport field to phba->pport in
lpfc_nvmet_sol_fcp_issue_abort as it does all abort iocbq initialization
in the routine. Using phba->pport is ok because target does not support
NPIV instances.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
4550f9c7 Fri Jun 16 00:56:49 CDT 2017 James Smart <jsmart2021@gmail.com> scsi: lpfc: Fix crash in lpfc_sli_ringtxcmpl_put when nvmet gets an abort request.

When running nvme detach-ns /dev/nvme0n1 -n 1 command, the nvmet lpfc
driver crashes with this stack dump:

kernel BUG at /root/NVME/lpfc_8.4/lpfc_sli.c:1393!
invalid opcode: 0000 [#1] SMP
Workqueue: nvmet-fc-cpu0 nvmet_fc_do_work_on_cpu [nvmet_fc]
lpfc_sli4_issue_wqe+0x357/0x440 [lpfc]
lpfc_nvmet_xmt_fcp_abort+0x36b/0x5c0 [lpfc]
nvmet_fc_abort_op+0x30/0x50 [nvmet_fc]
nvmet_fc_do_work_on_cpu+0xd9/0x130 [nvmet_fc]
process_one_work+0x14e/0x410
worker_thread+0x116/0x490
kthread+0xc7/0xe0
ret_from_fork+0x3f/0x70

Crash is due to an uninitialized iocbq->vport pointer.

Explicitly set the iocbq->vport field to phba->pport in
lpfc_nvmet_sol_fcp_issue_abort as it does all abort iocbq initialization
in the routine. Using phba->pport is ok because target does not support
NPIV instances.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>