mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
76b2c34aeb
commit
63e480fd2f
1 changed files with 6 additions and 4 deletions
|
@ -5202,10 +5202,12 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd)
|
||||||
if (status == FAILED) {
|
if (status == FAILED) {
|
||||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
|
lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
|
||||||
"0722 Target Reset rport failure: rdata x%p\n", rdata);
|
"0722 Target Reset rport failure: rdata x%p\n", rdata);
|
||||||
spin_lock_irq(shost->host_lock);
|
if (pnode) {
|
||||||
pnode->nlp_flag &= ~NLP_NPR_ADISC;
|
spin_lock_irq(shost->host_lock);
|
||||||
pnode->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
|
pnode->nlp_flag &= ~NLP_NPR_ADISC;
|
||||||
spin_unlock_irq(shost->host_lock);
|
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_reset_flush_io_context(vport, tgt_id, lun_id,
|
||||||
LPFC_CTX_TGT);
|
LPFC_CTX_TGT);
|
||||||
return FAST_IO_FAIL;
|
return FAST_IO_FAIL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue