diff options
author | James Smart <james.smart@emulex.com> | 2015-04-07 15:07:20 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-04-10 10:49:10 -0400 |
commit | 63e480fd2f598e9ad37f89e79c36834e7dd60ba0 (patch) | |
tree | 71d75fa200030fd26b1b6fb3c065e96c0c88d57f | |
parent | 76b2c34aeb947a649e52e0f03f5b930ef936e506 (diff) |
lpfc: Fix null ndlp dereference in target_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>
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index f6232991fb37..5612ba6bf213 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -5202,10 +5202,12 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) | |||
5202 | if (status == FAILED) { | 5202 | if (status == FAILED) { |
5203 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5203 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
5204 | "0722 Target Reset rport failure: rdata x%p\n", rdata); | 5204 | "0722 Target Reset rport failure: rdata x%p\n", rdata); |
5205 | spin_lock_irq(shost->host_lock); | 5205 | if (pnode) { |
5206 | pnode->nlp_flag &= ~NLP_NPR_ADISC; | 5206 | spin_lock_irq(shost->host_lock); |
5207 | pnode->nlp_fcp_info &= ~NLP_FCP_2_DEVICE; | 5207 | pnode->nlp_flag &= ~NLP_NPR_ADISC; |
5208 | spin_unlock_irq(shost->host_lock); | 5208 | pnode->nlp_fcp_info &= ~NLP_FCP_2_DEVICE; |
5209 | spin_unlock_irq(shost->host_lock); | ||
5210 | } | ||
5209 | lpfc_reset_flush_io_context(vport, tgt_id, lun_id, | 5211 | lpfc_reset_flush_io_context(vport, tgt_id, lun_id, |
5210 | LPFC_CTX_TGT); | 5212 | LPFC_CTX_TGT); |
5211 | return FAST_IO_FAIL; | 5213 | return FAST_IO_FAIL; |