Skip to contentSkip to conversation

lpfc: Fix crash in device reset handler.

PATCH In review James Smart 2 participants 2 messages Apr 3, 2015 – Apr 10, 2015

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

PATCH 18/21 lpfc: Fix crash in device reset handler.

Fix crash in device reset handler.

---
 drivers/scsi/lpfc/lpfc_scsi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +3 -2
index 9ed5f44..fbdc39c 100644
@@ -5464,9 +5464,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;
Signature · 1 line
1.7.11.7
Reviewed-by on v1 18/21
#1 lore raw
Quoted 5 lines · James Smart

Fix crash in device reset handler.

---

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html