linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/6] lpfc 8.1.4 : Fixed a timer panic due to timer firing after freeing ndlp
@ 2006-03-07 20:04 James Smart
  0 siblings, 0 replies; only message in thread
From: James Smart @ 2006-03-07 20:04 UTC (permalink / raw)
  To: linux-scsi


Fixed a timer panic due to timer firing after freeing ndlp


Signed-off-by: James Smart <James.Smart@emulex.com>

--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -68,6 +68,15 @@ lpfc_process_nodev_timeout(struct lpfc_h
 		return;
 	}
 
+	/*
+	 * If a discovery event readded nodev_timer after timer
+	 * firing and before processing the timer, cancel the
+	 * nlp_tmofunc.
+	 */
+	spin_unlock_irq(phba->host->host_lock);
+	del_timer_sync(&ndlp->nlp_tmofunc);
+	spin_lock_irq(phba->host->host_lock);
+
 	ndlp->nlp_flag &= ~NLP_NODEV_TMO;
 
 	if (ndlp->nlp_sid != NLP_NO_SID) {
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -1523,6 +1523,12 @@ lpfc_els_retry_delay_handler(struct lpfc
 
 	ndlp->nlp_flag &= ~NLP_DELAY_TMO;
 	spin_unlock_irq(phba->host->host_lock);
+	/*
+	 * If a discovery event readded nlp_delayfunc after timer
+	 * firing and before processing the timer, cancel the
+	 * nlp_delayfunc.
+	 */
+	del_timer_sync(&ndlp->nlp_delayfunc);
 	retry = ndlp->nlp_retry;
 
 	switch (cmd) {



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-07 20:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-07 20:04 [PATCH 3/6] lpfc 8.1.4 : Fixed a timer panic due to timer firing after freeing ndlp James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).