aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2015-04-07 15:07:26 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-04-10 07:50:16 -0700
commitad490b6e70c5756d0479ce1a7336626859b8b546 (patch)
tree439b360b9be34a862d46bd51c239d467bbacb635 /drivers/scsi
parentlpfc: Fix OS crash when running loopback test in applications (diff)
downloadlinux-dev-ad490b6e70c5756d0479ce1a7336626859b8b546.tar.xz
linux-dev-ad490b6e70c5756d0479ce1a7336626859b8b546.zip
lpfc: Fix crash in device reset handler.
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 5612ba6bf213..ea818f0ec218 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -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;