From: Chuck Anderson Date: Sat, 11 Feb 2012 01:05:53 +0000 (-0800) Subject: Fix mailbox and vpi memory leaks causing crashes (CR 126818) X-Git-Tag: v2.6.39-400.9.0~610^2~3 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=27695bde8c4983d7557bb50491565a4b3f1ab00c;p=users%2Fjedix%2Flinux-maple.git Fix mailbox and vpi memory leaks causing crashes (CR 126818) Oracle bug 13709784 Oracle bugzilla 13352 02/10/2012 Chuck Anderson Patch Emulex LPFC device driver to 8.3.5.58.2p commit comment: lpfc 8.3.29: Locking fix and Memory leak Fixes Fix mailbox and vpi memory leaks (126818) Signed-off-by: Chuck Anderson --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 1bf4412ed4ea..2e7c6f8bef91 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -8099,6 +8099,9 @@ lpfc_unset_hba(struct lpfc_hba *phba) vport->load_flag |= FC_UNLOADING; spin_unlock_irq(shost->host_lock); + kfree(phba->vpi_bmask); + kfree(phba->vpi_ids); + lpfc_stop_hba_timers(phba); phba->pport->work_port_events = 0; @@ -8631,6 +8634,9 @@ lpfc_pci_remove_one_s3(struct pci_dev *pdev) /* Final cleanup of txcmplq and reset the HBA */ lpfc_sli_brdrestart(phba); + kfree(phba->vpi_bmask); + kfree(phba->vpi_ids); + lpfc_stop_hba_timers(phba); spin_lock_irq(&phba->hbalock); list_del_init(&vport->listentry);