]> err.no Git - linux-2.6/commitdiff
[SCSI] lpfc 8.1.4 : Fixed a timer panic due to timer firing after freeing ndlp
authorJames Smart <James.Smart@Emulex.Com>
Tue, 7 Mar 2006 20:04:06 +0000 (15:04 -0500)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sun, 12 Mar 2006 14:56:38 +0000 (08:56 -0600)
Fixed a timer panic due to timer firing after freeing ndlp

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hbadisc.c

index 6d12cd0c49ff0ad78df2f09d26cf427855eae6dc..4813beaaca8f95a7f4f4f03c3bec1da2ee2eef45 100644 (file)
@@ -1523,6 +1523,12 @@ lpfc_els_retry_delay_handler(struct lpfc_nodelist *ndlp)
 
        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) {
index e15120d21aaaadf872a70f1d6735a31d6c8434ce..82704148d5d4c12ad6e0b23e30d8e8bce0f4b031 100644 (file)
@@ -68,6 +68,15 @@ lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
                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) {