Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63e480fd authored by James Smart's avatar James Smart Committed by James Bottomley
Browse files

lpfc: Fix null ndlp dereference in target_reset_handler

parent 76b2c34a
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -5202,10 +5202,12 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd)
	if (status == FAILED) {
		lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
			"0722 Target Reset rport failure: rdata x%p\n", rdata);
		if (pnode) {
			spin_lock_irq(shost->host_lock);
			pnode->nlp_flag &= ~NLP_NPR_ADISC;
			pnode->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
			spin_unlock_irq(shost->host_lock);
		}
		lpfc_reset_flush_io_context(vport, tgt_id, lun_id,
					  LPFC_CTX_TGT);
		return FAST_IO_FAIL;