提交 ad490b6e 编写于 作者: J James Smart 提交者: James Bottomley

lpfc: Fix crash in device reset handler.

Signed-off-by: NDick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: NJames Smart <james.smart@emulex.com>
Reviewed-by: NHannes Reinecke <hare@suse.de>
Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
上级 6c7cf486
......@@ -5118,9 +5118,10 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd)
int status;
rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
if (!rdata) {
if (!rdata || !rdata->pnode) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
"0798 Device Reset rport failure: rdata x%p\n", rdata);
"0798 Device Reset rport failure: rdata x%p\n",
rdata);
return FAILED;
}
pnode = rdata->pnode;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册