[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5a8fe8431e479268502daaa4265ee1a7644f1c7d.1453722244.git.jslaby@suse.cz>
Date: Mon, 25 Jan 2016 12:49:52 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, James Smart <james.smart@...lex.com>,
Dick Kennedy <dick.kennedy@...lex.com>,
James Bottomley <JBottomley@...n.com>,
Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 11/39] lpfc: Fix null ndlp dereference in target_reset_handler
From: James Smart <james.smart@...lex.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 63e480fd2f598e9ad37f89e79c36834e7dd60ba0 upstream.
Signed-off-by: Dick Kennedy <dick.kennedy@...lex.com>
Signed-off-by: James Smart <james.smart@...lex.com>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Signed-off-by: James Bottomley <JBottomley@...n.com>
Acked-by: Johannes Thumshirn <jthumshirn@...e.com>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
drivers/scsi/lpfc/lpfc_scsi.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index ed7759980c47..1d01ed6f8dd2 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -5264,7 +5264,15 @@ 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);
- return FAILED;
+ 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;
}
scsi_event.event_type = FC_REG_SCSI_EVENT;
--
2.7.0
Powered by blists - more mailing lists